| 1 | /* This file is automatically generated from CSSProperties.json by makeprop, do not edit */ |
| 2 | |
| 3 | #include "config.h" |
| 4 | #include "StyleBuilderGenerated.h" |
| 5 | |
| 6 | #include "CSSPrimitiveValueMappings.h" |
| 7 | #include "CSSProperty.h" |
| 8 | #include "RenderStyle.h" |
| 9 | #include "StyleBuilderState.h" |
| 10 | #include "StyleBuilderConverter.h" |
| 11 | #include "StyleBuilderCustom.h" |
| 12 | #include "StylePropertyShorthand.h" |
| 13 | |
| 14 | namespace WebCore { |
| 15 | namespace Style { |
| 16 | |
| 17 | class BuilderFunctions { |
| 18 | public: |
| 19 | static void applyInitialColor(BuilderState& builderState) |
| 20 | { |
| 21 | if (builderState.applyPropertyToRegularStyle()) |
| 22 | builderState.style().setColor(RenderStyle::initialColor()); |
| 23 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 24 | builderState.style().setVisitedLinkColor(RenderStyle::initialColor()); |
| 25 | } |
| 26 | static void applyInheritColor(BuilderState& builderState) |
| 27 | { |
| 28 | Color color = builderState.parentStyle().color(); |
| 29 | if (builderState.applyPropertyToRegularStyle()) |
| 30 | builderState.style().setColor(color); |
| 31 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 32 | builderState.style().setVisitedLinkColor(color); |
| 33 | } |
| 34 | static void applyValueColor(BuilderState& builderState, CSSValue& value) |
| 35 | { |
| 36 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
| 37 | if (primitiveValue.valueID() == CSSValueCurrentcolor) { |
| 38 | applyInheritColor(builderState); |
| 39 | return; |
| 40 | } |
| 41 | if (builderState.applyPropertyToRegularStyle()) |
| 42 | builderState.style().setColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
| 43 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 44 | builderState.style().setVisitedLinkColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
| 45 | } |
| 46 | static void applyInitialColorScheme(BuilderState& builderState) |
| 47 | { |
| 48 | builderState.style().setColorScheme(RenderStyle::initialColorScheme()); |
| 49 | } |
| 50 | static void applyInheritColorScheme(BuilderState& builderState) |
| 51 | { |
| 52 | builderState.style().setColorScheme(forwardInheritedValue(builderState.parentStyle().colorScheme())); |
| 53 | } |
| 54 | static void applyInitialDirection(BuilderState& builderState) |
| 55 | { |
| 56 | builderState.style().setDirection(RenderStyle::initialDirection()); |
| 57 | } |
| 58 | static void applyInheritDirection(BuilderState& builderState) |
| 59 | { |
| 60 | builderState.style().setDirection(forwardInheritedValue(builderState.parentStyle().direction())); |
| 61 | } |
| 62 | static void applyInitialDisplay(BuilderState& builderState) |
| 63 | { |
| 64 | builderState.style().setDisplay(RenderStyle::initialDisplay()); |
| 65 | } |
| 66 | static void applyValueFontFeatureSettings(BuilderState& builderState, CSSValue& value) |
| 67 | { |
| 68 | auto fontDescription = builderState.fontDescription(); |
| 69 | fontDescription.setFeatureSettings(BuilderConverter::convertFontFeatureSettings(builderState, value)); |
| 70 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 71 | } |
| 72 | static void applyInitialFontOpticalSizing(BuilderState& builderState) |
| 73 | { |
| 74 | auto fontDescription = builderState.fontDescription(); |
| 75 | fontDescription.setOpticalSizing(FontCascadeDescription::initialOpticalSizing()); |
| 76 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 77 | } |
| 78 | static void applyInheritFontOpticalSizing(BuilderState& builderState) |
| 79 | { |
| 80 | auto fontDescription = builderState.fontDescription(); |
| 81 | fontDescription.setOpticalSizing(builderState.parentFontDescription().opticalSizing()); |
| 82 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 83 | } |
| 84 | static void applyValueFontOpticalSizing(BuilderState& builderState, CSSValue& value) |
| 85 | { |
| 86 | auto fontDescription = builderState.fontDescription(); |
| 87 | fontDescription.setOpticalSizing(downcast<CSSPrimitiveValue>(value)); |
| 88 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 89 | } |
| 90 | static void applyInitialFontStretch(BuilderState& builderState) |
| 91 | { |
| 92 | auto fontDescription = builderState.fontDescription(); |
| 93 | fontDescription.setStretch(FontCascadeDescription::initialStretch()); |
| 94 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 95 | } |
| 96 | static void applyInheritFontStretch(BuilderState& builderState) |
| 97 | { |
| 98 | auto fontDescription = builderState.fontDescription(); |
| 99 | fontDescription.setStretch(builderState.parentFontDescription().stretch()); |
| 100 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 101 | } |
| 102 | static void applyValueFontStretch(BuilderState& builderState, CSSValue& value) |
| 103 | { |
| 104 | auto fontDescription = builderState.fontDescription(); |
| 105 | fontDescription.setStretch(BuilderConverter::convertFontStretch(builderState, value)); |
| 106 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 107 | } |
| 108 | static void applyInitialFontSynthesis(BuilderState& builderState) |
| 109 | { |
| 110 | auto fontDescription = builderState.fontDescription(); |
| 111 | fontDescription.setFontSynthesis(FontCascadeDescription::initialFontSynthesis()); |
| 112 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 113 | } |
| 114 | static void applyInheritFontSynthesis(BuilderState& builderState) |
| 115 | { |
| 116 | auto fontDescription = builderState.fontDescription(); |
| 117 | fontDescription.setFontSynthesis(builderState.parentFontDescription().fontSynthesis()); |
| 118 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 119 | } |
| 120 | static void applyValueFontSynthesis(BuilderState& builderState, CSSValue& value) |
| 121 | { |
| 122 | auto fontDescription = builderState.fontDescription(); |
| 123 | fontDescription.setFontSynthesis(BuilderConverter::convertFontSynthesis(builderState, value)); |
| 124 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 125 | } |
| 126 | static void applyInitialFontVariantAlternates(BuilderState& builderState) |
| 127 | { |
| 128 | auto fontDescription = builderState.fontDescription(); |
| 129 | fontDescription.setVariantAlternates(FontCascadeDescription::initialVariantAlternates()); |
| 130 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 131 | } |
| 132 | static void applyInheritFontVariantAlternates(BuilderState& builderState) |
| 133 | { |
| 134 | auto fontDescription = builderState.fontDescription(); |
| 135 | fontDescription.setVariantAlternates(builderState.parentFontDescription().variantAlternates()); |
| 136 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 137 | } |
| 138 | static void applyValueFontVariantAlternates(BuilderState& builderState, CSSValue& value) |
| 139 | { |
| 140 | auto fontDescription = builderState.fontDescription(); |
| 141 | fontDescription.setVariantAlternates(downcast<CSSPrimitiveValue>(value)); |
| 142 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 143 | } |
| 144 | static void applyInitialFontVariantCaps(BuilderState& builderState) |
| 145 | { |
| 146 | auto fontDescription = builderState.fontDescription(); |
| 147 | fontDescription.setVariantCaps(FontCascadeDescription::initialVariantCaps()); |
| 148 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 149 | } |
| 150 | static void applyInheritFontVariantCaps(BuilderState& builderState) |
| 151 | { |
| 152 | auto fontDescription = builderState.fontDescription(); |
| 153 | fontDescription.setVariantCaps(builderState.parentFontDescription().variantCaps()); |
| 154 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 155 | } |
| 156 | static void applyValueFontVariantCaps(BuilderState& builderState, CSSValue& value) |
| 157 | { |
| 158 | auto fontDescription = builderState.fontDescription(); |
| 159 | fontDescription.setVariantCaps(downcast<CSSPrimitiveValue>(value)); |
| 160 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 161 | } |
| 162 | static void applyInitialFontVariantPosition(BuilderState& builderState) |
| 163 | { |
| 164 | auto fontDescription = builderState.fontDescription(); |
| 165 | fontDescription.setVariantPosition(FontCascadeDescription::initialVariantPosition()); |
| 166 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 167 | } |
| 168 | static void applyInheritFontVariantPosition(BuilderState& builderState) |
| 169 | { |
| 170 | auto fontDescription = builderState.fontDescription(); |
| 171 | fontDescription.setVariantPosition(builderState.parentFontDescription().variantPosition()); |
| 172 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 173 | } |
| 174 | static void applyValueFontVariantPosition(BuilderState& builderState, CSSValue& value) |
| 175 | { |
| 176 | auto fontDescription = builderState.fontDescription(); |
| 177 | fontDescription.setVariantPosition(downcast<CSSPrimitiveValue>(value)); |
| 178 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 179 | } |
| 180 | static void applyValueFontVariationSettings(BuilderState& builderState, CSSValue& value) |
| 181 | { |
| 182 | auto fontDescription = builderState.fontDescription(); |
| 183 | fontDescription.setVariationSettings(BuilderConverter::convertFontVariationSettings(builderState, value)); |
| 184 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 185 | } |
| 186 | static void applyInitialFontWeight(BuilderState& builderState) |
| 187 | { |
| 188 | auto fontDescription = builderState.fontDescription(); |
| 189 | fontDescription.setWeight(FontCascadeDescription::initialWeight()); |
| 190 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 191 | } |
| 192 | static void applyInheritFontWeight(BuilderState& builderState) |
| 193 | { |
| 194 | auto fontDescription = builderState.fontDescription(); |
| 195 | fontDescription.setWeight(builderState.parentFontDescription().weight()); |
| 196 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 197 | } |
| 198 | static void applyValueFontWeight(BuilderState& builderState, CSSValue& value) |
| 199 | { |
| 200 | auto fontDescription = builderState.fontDescription(); |
| 201 | fontDescription.setWeight(BuilderConverter::convertFontWeight(builderState, value)); |
| 202 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 203 | } |
| 204 | static void applyInitialTextOrientation(BuilderState& builderState) |
| 205 | { |
| 206 | builderState.style().setTextOrientation(RenderStyle::initialTextOrientation()); |
| 207 | } |
| 208 | static void applyInheritTextOrientation(BuilderState& builderState) |
| 209 | { |
| 210 | builderState.style().setTextOrientation(forwardInheritedValue(builderState.parentStyle().textOrientation())); |
| 211 | } |
| 212 | static void applyInitialTextRendering(BuilderState& builderState) |
| 213 | { |
| 214 | auto fontDescription = builderState.fontDescription(); |
| 215 | fontDescription.setTextRenderingMode(FontCascadeDescription::initialTextRenderingMode()); |
| 216 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 217 | } |
| 218 | static void applyInheritTextRendering(BuilderState& builderState) |
| 219 | { |
| 220 | auto fontDescription = builderState.fontDescription(); |
| 221 | fontDescription.setTextRenderingMode(builderState.parentFontDescription().textRenderingMode()); |
| 222 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 223 | } |
| 224 | static void applyValueTextRendering(BuilderState& builderState, CSSValue& value) |
| 225 | { |
| 226 | auto fontDescription = builderState.fontDescription(); |
| 227 | fontDescription.setTextRenderingMode(downcast<CSSPrimitiveValue>(value)); |
| 228 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 229 | } |
| 230 | static void applyInitialWritingMode(BuilderState& builderState) |
| 231 | { |
| 232 | builderState.style().setWritingMode(RenderStyle::initialWritingMode()); |
| 233 | } |
| 234 | static void applyInheritWritingMode(BuilderState& builderState) |
| 235 | { |
| 236 | builderState.style().setWritingMode(forwardInheritedValue(builderState.parentStyle().writingMode())); |
| 237 | } |
| 238 | static void applyInitialWebkitFontKerning(BuilderState& builderState) |
| 239 | { |
| 240 | auto fontDescription = builderState.fontDescription(); |
| 241 | fontDescription.setKerning(FontCascadeDescription::initialKerning()); |
| 242 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 243 | } |
| 244 | static void applyInheritWebkitFontKerning(BuilderState& builderState) |
| 245 | { |
| 246 | auto fontDescription = builderState.fontDescription(); |
| 247 | fontDescription.setKerning(builderState.parentFontDescription().kerning()); |
| 248 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 249 | } |
| 250 | static void applyValueWebkitFontKerning(BuilderState& builderState, CSSValue& value) |
| 251 | { |
| 252 | auto fontDescription = builderState.fontDescription(); |
| 253 | fontDescription.setKerning(downcast<CSSPrimitiveValue>(value)); |
| 254 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 255 | } |
| 256 | static void applyInitialWebkitFontSmoothing(BuilderState& builderState) |
| 257 | { |
| 258 | auto fontDescription = builderState.fontDescription(); |
| 259 | fontDescription.setFontSmoothing(FontCascadeDescription::initialFontSmoothing()); |
| 260 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 261 | } |
| 262 | static void applyInheritWebkitFontSmoothing(BuilderState& builderState) |
| 263 | { |
| 264 | auto fontDescription = builderState.fontDescription(); |
| 265 | fontDescription.setFontSmoothing(builderState.parentFontDescription().fontSmoothing()); |
| 266 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 267 | } |
| 268 | static void applyValueWebkitFontSmoothing(BuilderState& builderState, CSSValue& value) |
| 269 | { |
| 270 | auto fontDescription = builderState.fontDescription(); |
| 271 | fontDescription.setFontSmoothing(downcast<CSSPrimitiveValue>(value)); |
| 272 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 273 | } |
| 274 | static void applyInitialWebkitLocale(BuilderState& builderState) |
| 275 | { |
| 276 | auto fontDescription = builderState.fontDescription(); |
| 277 | fontDescription.setSpecifiedLocale(FontCascadeDescription::initialSpecifiedLocale()); |
| 278 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 279 | } |
| 280 | static void applyInheritWebkitLocale(BuilderState& builderState) |
| 281 | { |
| 282 | auto fontDescription = builderState.fontDescription(); |
| 283 | fontDescription.setSpecifiedLocale(builderState.parentFontDescription().specifiedLocale()); |
| 284 | builderState.setFontDescription(WTFMove(fontDescription)); |
| 285 | } |
| 286 | static void applyInitialWebkitTextOrientation(BuilderState& builderState) |
| 287 | { |
| 288 | builderState.style().setTextOrientation(RenderStyle::initialTextOrientation()); |
| 289 | } |
| 290 | static void applyInheritWebkitTextOrientation(BuilderState& builderState) |
| 291 | { |
| 292 | builderState.style().setTextOrientation(forwardInheritedValue(builderState.parentStyle().textOrientation())); |
| 293 | } |
| 294 | static void applyInitialWebkitTextSizeAdjust(BuilderState& builderState) |
| 295 | { |
| 296 | builderState.style().setTextSizeAdjust(RenderStyle::initialTextSizeAdjust()); |
| 297 | } |
| 298 | static void applyInheritWebkitTextSizeAdjust(BuilderState& builderState) |
| 299 | { |
| 300 | builderState.style().setTextSizeAdjust(forwardInheritedValue(builderState.parentStyle().textSizeAdjust())); |
| 301 | } |
| 302 | static void applyInitialWebkitTextZoom(BuilderState& builderState) |
| 303 | { |
| 304 | builderState.style().setTextZoom(RenderStyle::initialTextZoom()); |
| 305 | } |
| 306 | static void applyInheritWebkitTextZoom(BuilderState& builderState) |
| 307 | { |
| 308 | builderState.style().setTextZoom(forwardInheritedValue(builderState.parentStyle().textZoom())); |
| 309 | } |
| 310 | static void applyInitialAlignContent(BuilderState& builderState) |
| 311 | { |
| 312 | builderState.style().setAlignContent(RenderStyle::initialContentAlignment()); |
| 313 | } |
| 314 | static void applyInheritAlignContent(BuilderState& builderState) |
| 315 | { |
| 316 | builderState.style().setAlignContent(forwardInheritedValue(builderState.parentStyle().alignContent())); |
| 317 | } |
| 318 | static void applyValueAlignContent(BuilderState& builderState, CSSValue& value) |
| 319 | { |
| 320 | builderState.style().setAlignContent(BuilderConverter::convertContentAlignmentData(builderState, value)); |
| 321 | } |
| 322 | static void applyInitialAlignItems(BuilderState& builderState) |
| 323 | { |
| 324 | builderState.style().setAlignItems(RenderStyle::initialDefaultAlignment()); |
| 325 | } |
| 326 | static void applyInheritAlignItems(BuilderState& builderState) |
| 327 | { |
| 328 | builderState.style().setAlignItems(forwardInheritedValue(builderState.parentStyle().alignItems())); |
| 329 | } |
| 330 | static void applyValueAlignItems(BuilderState& builderState, CSSValue& value) |
| 331 | { |
| 332 | builderState.style().setAlignItems(BuilderConverter::convertSelfOrDefaultAlignmentData(builderState, value)); |
| 333 | } |
| 334 | static void applyInitialAlignSelf(BuilderState& builderState) |
| 335 | { |
| 336 | builderState.style().setAlignSelf(RenderStyle::initialSelfAlignment()); |
| 337 | } |
| 338 | static void applyInheritAlignSelf(BuilderState& builderState) |
| 339 | { |
| 340 | builderState.style().setAlignSelf(forwardInheritedValue(builderState.parentStyle().alignSelf())); |
| 341 | } |
| 342 | static void applyValueAlignSelf(BuilderState& builderState, CSSValue& value) |
| 343 | { |
| 344 | builderState.style().setAlignSelf(BuilderConverter::convertSelfOrDefaultAlignmentData(builderState, value)); |
| 345 | } |
| 346 | static void applyInitialAlignmentBaseline(BuilderState& builderState) |
| 347 | { |
| 348 | builderState.style().accessSVGStyle().setAlignmentBaseline(SVGRenderStyle::initialAlignmentBaseline()); |
| 349 | } |
| 350 | static void applyInheritAlignmentBaseline(BuilderState& builderState) |
| 351 | { |
| 352 | builderState.style().accessSVGStyle().setAlignmentBaseline(forwardInheritedValue(builderState.parentStyle().svgStyle().alignmentBaseline())); |
| 353 | } |
| 354 | static void applyValueAlignmentBaseline(BuilderState& builderState, CSSValue& value) |
| 355 | { |
| 356 | builderState.style().accessSVGStyle().setAlignmentBaseline(downcast<CSSPrimitiveValue>(value)); |
| 357 | } |
| 358 | static void applyInitialAlt(BuilderState& builderState) |
| 359 | { |
| 360 | builderState.style().setContentAltText(RenderStyle::initialContentAltText()); |
| 361 | } |
| 362 | static void applyInheritAlt(BuilderState& builderState) |
| 363 | { |
| 364 | builderState.style().setContentAltText(forwardInheritedValue(builderState.parentStyle().contentAltText())); |
| 365 | } |
| 366 | static void applyInitialAnimationDelay(BuilderState& builderState) |
| 367 | { |
| 368 | AnimationList& list = builderState.style().ensureAnimations(); |
| 369 | if (list.isEmpty()) |
| 370 | list.append(Animation::create()); |
| 371 | list.animation(0).setDelay(Animation::initialDelay()); |
| 372 | for (size_t i = 1; i < list.size(); ++i) |
| 373 | list.animation(i).clearDelay(); |
| 374 | } |
| 375 | static void applyInheritAnimationDelay(BuilderState& builderState) |
| 376 | { |
| 377 | auto& list = builderState.style().ensureAnimations(); |
| 378 | auto* parentList = builderState.parentStyle().animations(); |
| 379 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
| 380 | for ( ; i < parentSize && parentList->animation(i).isDelaySet(); ++i) { |
| 381 | if (list.size() <= i) |
| 382 | list.append(Animation::create()); |
| 383 | list.animation(i).setDelay(parentList->animation(i).delay()); |
| 384 | } |
| 385 | |
| 386 | // Reset any remaining animations to not have the property set. |
| 387 | for ( ; i < list.size(); ++i) |
| 388 | list.animation(i).clearDelay(); |
| 389 | } |
| 390 | static void applyValueAnimationDelay(BuilderState& builderState, CSSValue& value) |
| 391 | { |
| 392 | AnimationList& list = builderState.style().ensureAnimations(); |
| 393 | size_t childIndex = 0; |
| 394 | if (is<CSSValueList>(value)) { |
| 395 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
| 396 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
| 397 | if (childIndex <= list.size()) |
| 398 | list.append(Animation::create()); |
| 399 | builderState.styleMap().mapAnimationDelay(list.animation(childIndex), currentValue); |
| 400 | ++childIndex; |
| 401 | } |
| 402 | } else { |
| 403 | if (list.isEmpty()) |
| 404 | list.append(Animation::create()); |
| 405 | builderState.styleMap().mapAnimationDelay(list.animation(childIndex), value); |
| 406 | childIndex = 1; |
| 407 | } |
| 408 | for ( ; childIndex < list.size(); ++childIndex) { |
| 409 | /* Reset all remaining animations to not have the property set. */ |
| 410 | list.animation(childIndex).clearDelay(); |
| 411 | } |
| 412 | } |
| 413 | static void applyInitialAnimationDirection(BuilderState& builderState) |
| 414 | { |
| 415 | AnimationList& list = builderState.style().ensureAnimations(); |
| 416 | if (list.isEmpty()) |
| 417 | list.append(Animation::create()); |
| 418 | list.animation(0).setDirection(Animation::initialDirection()); |
| 419 | for (size_t i = 1; i < list.size(); ++i) |
| 420 | list.animation(i).clearDirection(); |
| 421 | } |
| 422 | static void applyInheritAnimationDirection(BuilderState& builderState) |
| 423 | { |
| 424 | auto& list = builderState.style().ensureAnimations(); |
| 425 | auto* parentList = builderState.parentStyle().animations(); |
| 426 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
| 427 | for ( ; i < parentSize && parentList->animation(i).isDirectionSet(); ++i) { |
| 428 | if (list.size() <= i) |
| 429 | list.append(Animation::create()); |
| 430 | list.animation(i).setDirection(parentList->animation(i).direction()); |
| 431 | } |
| 432 | |
| 433 | // Reset any remaining animations to not have the property set. |
| 434 | for ( ; i < list.size(); ++i) |
| 435 | list.animation(i).clearDirection(); |
| 436 | } |
| 437 | static void applyValueAnimationDirection(BuilderState& builderState, CSSValue& value) |
| 438 | { |
| 439 | AnimationList& list = builderState.style().ensureAnimations(); |
| 440 | size_t childIndex = 0; |
| 441 | if (is<CSSValueList>(value)) { |
| 442 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
| 443 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
| 444 | if (childIndex <= list.size()) |
| 445 | list.append(Animation::create()); |
| 446 | builderState.styleMap().mapAnimationDirection(list.animation(childIndex), currentValue); |
| 447 | ++childIndex; |
| 448 | } |
| 449 | } else { |
| 450 | if (list.isEmpty()) |
| 451 | list.append(Animation::create()); |
| 452 | builderState.styleMap().mapAnimationDirection(list.animation(childIndex), value); |
| 453 | childIndex = 1; |
| 454 | } |
| 455 | for ( ; childIndex < list.size(); ++childIndex) { |
| 456 | /* Reset all remaining animations to not have the property set. */ |
| 457 | list.animation(childIndex).clearDirection(); |
| 458 | } |
| 459 | } |
| 460 | static void applyInitialAnimationDuration(BuilderState& builderState) |
| 461 | { |
| 462 | AnimationList& list = builderState.style().ensureAnimations(); |
| 463 | if (list.isEmpty()) |
| 464 | list.append(Animation::create()); |
| 465 | list.animation(0).setDuration(Animation::initialDuration()); |
| 466 | for (size_t i = 1; i < list.size(); ++i) |
| 467 | list.animation(i).clearDuration(); |
| 468 | } |
| 469 | static void applyInheritAnimationDuration(BuilderState& builderState) |
| 470 | { |
| 471 | auto& list = builderState.style().ensureAnimations(); |
| 472 | auto* parentList = builderState.parentStyle().animations(); |
| 473 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
| 474 | for ( ; i < parentSize && parentList->animation(i).isDurationSet(); ++i) { |
| 475 | if (list.size() <= i) |
| 476 | list.append(Animation::create()); |
| 477 | list.animation(i).setDuration(parentList->animation(i).duration()); |
| 478 | } |
| 479 | |
| 480 | // Reset any remaining animations to not have the property set. |
| 481 | for ( ; i < list.size(); ++i) |
| 482 | list.animation(i).clearDuration(); |
| 483 | } |
| 484 | static void applyValueAnimationDuration(BuilderState& builderState, CSSValue& value) |
| 485 | { |
| 486 | AnimationList& list = builderState.style().ensureAnimations(); |
| 487 | size_t childIndex = 0; |
| 488 | if (is<CSSValueList>(value)) { |
| 489 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
| 490 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
| 491 | if (childIndex <= list.size()) |
| 492 | list.append(Animation::create()); |
| 493 | builderState.styleMap().mapAnimationDuration(list.animation(childIndex), currentValue); |
| 494 | ++childIndex; |
| 495 | } |
| 496 | } else { |
| 497 | if (list.isEmpty()) |
| 498 | list.append(Animation::create()); |
| 499 | builderState.styleMap().mapAnimationDuration(list.animation(childIndex), value); |
| 500 | childIndex = 1; |
| 501 | } |
| 502 | for ( ; childIndex < list.size(); ++childIndex) { |
| 503 | /* Reset all remaining animations to not have the property set. */ |
| 504 | list.animation(childIndex).clearDuration(); |
| 505 | } |
| 506 | } |
| 507 | static void applyInitialAnimationFillMode(BuilderState& builderState) |
| 508 | { |
| 509 | AnimationList& list = builderState.style().ensureAnimations(); |
| 510 | if (list.isEmpty()) |
| 511 | list.append(Animation::create()); |
| 512 | list.animation(0).setFillMode(Animation::initialFillMode()); |
| 513 | for (size_t i = 1; i < list.size(); ++i) |
| 514 | list.animation(i).clearFillMode(); |
| 515 | } |
| 516 | static void applyInheritAnimationFillMode(BuilderState& builderState) |
| 517 | { |
| 518 | auto& list = builderState.style().ensureAnimations(); |
| 519 | auto* parentList = builderState.parentStyle().animations(); |
| 520 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
| 521 | for ( ; i < parentSize && parentList->animation(i).isFillModeSet(); ++i) { |
| 522 | if (list.size() <= i) |
| 523 | list.append(Animation::create()); |
| 524 | list.animation(i).setFillMode(parentList->animation(i).fillMode()); |
| 525 | } |
| 526 | |
| 527 | // Reset any remaining animations to not have the property set. |
| 528 | for ( ; i < list.size(); ++i) |
| 529 | list.animation(i).clearFillMode(); |
| 530 | } |
| 531 | static void applyValueAnimationFillMode(BuilderState& builderState, CSSValue& value) |
| 532 | { |
| 533 | AnimationList& list = builderState.style().ensureAnimations(); |
| 534 | size_t childIndex = 0; |
| 535 | if (is<CSSValueList>(value)) { |
| 536 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
| 537 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
| 538 | if (childIndex <= list.size()) |
| 539 | list.append(Animation::create()); |
| 540 | builderState.styleMap().mapAnimationFillMode(list.animation(childIndex), currentValue); |
| 541 | ++childIndex; |
| 542 | } |
| 543 | } else { |
| 544 | if (list.isEmpty()) |
| 545 | list.append(Animation::create()); |
| 546 | builderState.styleMap().mapAnimationFillMode(list.animation(childIndex), value); |
| 547 | childIndex = 1; |
| 548 | } |
| 549 | for ( ; childIndex < list.size(); ++childIndex) { |
| 550 | /* Reset all remaining animations to not have the property set. */ |
| 551 | list.animation(childIndex).clearFillMode(); |
| 552 | } |
| 553 | } |
| 554 | static void applyInitialAnimationIterationCount(BuilderState& builderState) |
| 555 | { |
| 556 | AnimationList& list = builderState.style().ensureAnimations(); |
| 557 | if (list.isEmpty()) |
| 558 | list.append(Animation::create()); |
| 559 | list.animation(0).setIterationCount(Animation::initialIterationCount()); |
| 560 | for (size_t i = 1; i < list.size(); ++i) |
| 561 | list.animation(i).clearIterationCount(); |
| 562 | } |
| 563 | static void applyInheritAnimationIterationCount(BuilderState& builderState) |
| 564 | { |
| 565 | auto& list = builderState.style().ensureAnimations(); |
| 566 | auto* parentList = builderState.parentStyle().animations(); |
| 567 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
| 568 | for ( ; i < parentSize && parentList->animation(i).isIterationCountSet(); ++i) { |
| 569 | if (list.size() <= i) |
| 570 | list.append(Animation::create()); |
| 571 | list.animation(i).setIterationCount(parentList->animation(i).iterationCount()); |
| 572 | } |
| 573 | |
| 574 | // Reset any remaining animations to not have the property set. |
| 575 | for ( ; i < list.size(); ++i) |
| 576 | list.animation(i).clearIterationCount(); |
| 577 | } |
| 578 | static void applyValueAnimationIterationCount(BuilderState& builderState, CSSValue& value) |
| 579 | { |
| 580 | AnimationList& list = builderState.style().ensureAnimations(); |
| 581 | size_t childIndex = 0; |
| 582 | if (is<CSSValueList>(value)) { |
| 583 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
| 584 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
| 585 | if (childIndex <= list.size()) |
| 586 | list.append(Animation::create()); |
| 587 | builderState.styleMap().mapAnimationIterationCount(list.animation(childIndex), currentValue); |
| 588 | ++childIndex; |
| 589 | } |
| 590 | } else { |
| 591 | if (list.isEmpty()) |
| 592 | list.append(Animation::create()); |
| 593 | builderState.styleMap().mapAnimationIterationCount(list.animation(childIndex), value); |
| 594 | childIndex = 1; |
| 595 | } |
| 596 | for ( ; childIndex < list.size(); ++childIndex) { |
| 597 | /* Reset all remaining animations to not have the property set. */ |
| 598 | list.animation(childIndex).clearIterationCount(); |
| 599 | } |
| 600 | } |
| 601 | static void applyInitialAnimationName(BuilderState& builderState) |
| 602 | { |
| 603 | AnimationList& list = builderState.style().ensureAnimations(); |
| 604 | if (list.isEmpty()) |
| 605 | list.append(Animation::create()); |
| 606 | list.animation(0).setName(Animation::initialName()); |
| 607 | for (size_t i = 1; i < list.size(); ++i) |
| 608 | list.animation(i).clearName(); |
| 609 | } |
| 610 | static void applyInheritAnimationName(BuilderState& builderState) |
| 611 | { |
| 612 | auto& list = builderState.style().ensureAnimations(); |
| 613 | auto* parentList = builderState.parentStyle().animations(); |
| 614 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
| 615 | for ( ; i < parentSize && parentList->animation(i).isNameSet(); ++i) { |
| 616 | if (list.size() <= i) |
| 617 | list.append(Animation::create()); |
| 618 | list.animation(i).setName(parentList->animation(i).name()); |
| 619 | } |
| 620 | |
| 621 | // Reset any remaining animations to not have the property set. |
| 622 | for ( ; i < list.size(); ++i) |
| 623 | list.animation(i).clearName(); |
| 624 | } |
| 625 | static void applyValueAnimationName(BuilderState& builderState, CSSValue& value) |
| 626 | { |
| 627 | AnimationList& list = builderState.style().ensureAnimations(); |
| 628 | size_t childIndex = 0; |
| 629 | if (is<CSSValueList>(value)) { |
| 630 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
| 631 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
| 632 | if (childIndex <= list.size()) |
| 633 | list.append(Animation::create()); |
| 634 | builderState.styleMap().mapAnimationName(list.animation(childIndex), currentValue); |
| 635 | ++childIndex; |
| 636 | } |
| 637 | } else { |
| 638 | if (list.isEmpty()) |
| 639 | list.append(Animation::create()); |
| 640 | builderState.styleMap().mapAnimationName(list.animation(childIndex), value); |
| 641 | childIndex = 1; |
| 642 | } |
| 643 | for ( ; childIndex < list.size(); ++childIndex) { |
| 644 | /* Reset all remaining animations to not have the property set. */ |
| 645 | list.animation(childIndex).clearName(); |
| 646 | } |
| 647 | } |
| 648 | static void applyInitialAnimationPlayState(BuilderState& builderState) |
| 649 | { |
| 650 | AnimationList& list = builderState.style().ensureAnimations(); |
| 651 | if (list.isEmpty()) |
| 652 | list.append(Animation::create()); |
| 653 | list.animation(0).setPlayState(Animation::initialPlayState()); |
| 654 | for (size_t i = 1; i < list.size(); ++i) |
| 655 | list.animation(i).clearPlayState(); |
| 656 | } |
| 657 | static void applyInheritAnimationPlayState(BuilderState& builderState) |
| 658 | { |
| 659 | auto& list = builderState.style().ensureAnimations(); |
| 660 | auto* parentList = builderState.parentStyle().animations(); |
| 661 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
| 662 | for ( ; i < parentSize && parentList->animation(i).isPlayStateSet(); ++i) { |
| 663 | if (list.size() <= i) |
| 664 | list.append(Animation::create()); |
| 665 | list.animation(i).setPlayState(parentList->animation(i).playState()); |
| 666 | } |
| 667 | |
| 668 | // Reset any remaining animations to not have the property set. |
| 669 | for ( ; i < list.size(); ++i) |
| 670 | list.animation(i).clearPlayState(); |
| 671 | } |
| 672 | static void applyValueAnimationPlayState(BuilderState& builderState, CSSValue& value) |
| 673 | { |
| 674 | AnimationList& list = builderState.style().ensureAnimations(); |
| 675 | size_t childIndex = 0; |
| 676 | if (is<CSSValueList>(value)) { |
| 677 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
| 678 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
| 679 | if (childIndex <= list.size()) |
| 680 | list.append(Animation::create()); |
| 681 | builderState.styleMap().mapAnimationPlayState(list.animation(childIndex), currentValue); |
| 682 | ++childIndex; |
| 683 | } |
| 684 | } else { |
| 685 | if (list.isEmpty()) |
| 686 | list.append(Animation::create()); |
| 687 | builderState.styleMap().mapAnimationPlayState(list.animation(childIndex), value); |
| 688 | childIndex = 1; |
| 689 | } |
| 690 | for ( ; childIndex < list.size(); ++childIndex) { |
| 691 | /* Reset all remaining animations to not have the property set. */ |
| 692 | list.animation(childIndex).clearPlayState(); |
| 693 | } |
| 694 | } |
| 695 | static void applyInitialAnimationTimingFunction(BuilderState& builderState) |
| 696 | { |
| 697 | AnimationList& list = builderState.style().ensureAnimations(); |
| 698 | if (list.isEmpty()) |
| 699 | list.append(Animation::create()); |
| 700 | list.animation(0).setTimingFunction(Animation::initialTimingFunction()); |
| 701 | for (size_t i = 1; i < list.size(); ++i) |
| 702 | list.animation(i).clearTimingFunction(); |
| 703 | } |
| 704 | static void applyInheritAnimationTimingFunction(BuilderState& builderState) |
| 705 | { |
| 706 | auto& list = builderState.style().ensureAnimations(); |
| 707 | auto* parentList = builderState.parentStyle().animations(); |
| 708 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
| 709 | for ( ; i < parentSize && parentList->animation(i).isTimingFunctionSet(); ++i) { |
| 710 | if (list.size() <= i) |
| 711 | list.append(Animation::create()); |
| 712 | list.animation(i).setTimingFunction(parentList->animation(i).timingFunction()); |
| 713 | } |
| 714 | |
| 715 | // Reset any remaining animations to not have the property set. |
| 716 | for ( ; i < list.size(); ++i) |
| 717 | list.animation(i).clearTimingFunction(); |
| 718 | } |
| 719 | static void applyValueAnimationTimingFunction(BuilderState& builderState, CSSValue& value) |
| 720 | { |
| 721 | AnimationList& list = builderState.style().ensureAnimations(); |
| 722 | size_t childIndex = 0; |
| 723 | if (is<CSSValueList>(value)) { |
| 724 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
| 725 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
| 726 | if (childIndex <= list.size()) |
| 727 | list.append(Animation::create()); |
| 728 | builderState.styleMap().mapAnimationTimingFunction(list.animation(childIndex), currentValue); |
| 729 | ++childIndex; |
| 730 | } |
| 731 | } else { |
| 732 | if (list.isEmpty()) |
| 733 | list.append(Animation::create()); |
| 734 | builderState.styleMap().mapAnimationTimingFunction(list.animation(childIndex), value); |
| 735 | childIndex = 1; |
| 736 | } |
| 737 | for ( ; childIndex < list.size(); ++childIndex) { |
| 738 | /* Reset all remaining animations to not have the property set. */ |
| 739 | list.animation(childIndex).clearTimingFunction(); |
| 740 | } |
| 741 | } |
| 742 | static void applyInitialBackgroundAttachment(BuilderState& builderState) |
| 743 | { |
| 744 | // Check for (single-layer) no-op before clearing anything. |
| 745 | auto& layers = builderState.style().backgroundLayers(); |
| 746 | if (!layers.next() && (!layers.isAttachmentSet() || layers.attachment() == FillLayer::initialFillAttachment(FillLayerType::Background))) |
| 747 | return; |
| 748 | |
| 749 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 750 | child->setAttachment(FillLayer::initialFillAttachment(FillLayerType::Background)); |
| 751 | for (child = child->next(); child; child = child->next()) |
| 752 | child->clearAttachment(); |
| 753 | } |
| 754 | static void applyInheritBackgroundAttachment(BuilderState& builderState) |
| 755 | { |
| 756 | // Check for no-op before copying anything. |
| 757 | if (builderState.parentStyle().backgroundLayers() == builderState.style().backgroundLayers()) |
| 758 | return; |
| 759 | |
| 760 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 761 | FillLayer* previousChild = nullptr; |
| 762 | for (auto* parent = &builderState.parentStyle().backgroundLayers(); parent && parent->isAttachmentSet(); parent = parent->next()) { |
| 763 | if (!child) { |
| 764 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 765 | child = previousChild->next(); |
| 766 | } |
| 767 | child->setAttachment(parent->attachment()); |
| 768 | previousChild = child; |
| 769 | child = previousChild->next(); |
| 770 | } |
| 771 | for (; child; child = child->next()) |
| 772 | child->clearAttachment(); |
| 773 | } |
| 774 | static void applyValueBackgroundAttachment(BuilderState& builderState, CSSValue& value) |
| 775 | { |
| 776 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 777 | FillLayer* previousChild = nullptr; |
| 778 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 779 | // Walk each value and put it into a layer, creating new layers as needed. |
| 780 | for (auto& item : downcast<CSSValueList>(value)) { |
| 781 | if (!child) { |
| 782 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 783 | child = previousChild->next(); |
| 784 | } |
| 785 | builderState.styleMap().mapFillAttachment(CSSPropertyBackgroundAttachment, *child, item); |
| 786 | previousChild = child; |
| 787 | child = child->next(); |
| 788 | } |
| 789 | } else { |
| 790 | builderState.styleMap().mapFillAttachment(CSSPropertyBackgroundAttachment, *child, value); |
| 791 | child = child->next(); |
| 792 | } |
| 793 | for (; child; child = child->next()) |
| 794 | child->clearAttachment(); |
| 795 | } |
| 796 | static void applyInitialBackgroundBlendMode(BuilderState& builderState) |
| 797 | { |
| 798 | // Check for (single-layer) no-op before clearing anything. |
| 799 | auto& layers = builderState.style().backgroundLayers(); |
| 800 | if (!layers.next() && (!layers.isBlendModeSet() || layers.blendMode() == FillLayer::initialFillBlendMode(FillLayerType::Background))) |
| 801 | return; |
| 802 | |
| 803 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 804 | child->setBlendMode(FillLayer::initialFillBlendMode(FillLayerType::Background)); |
| 805 | for (child = child->next(); child; child = child->next()) |
| 806 | child->clearBlendMode(); |
| 807 | } |
| 808 | static void applyInheritBackgroundBlendMode(BuilderState& builderState) |
| 809 | { |
| 810 | // Check for no-op before copying anything. |
| 811 | if (builderState.parentStyle().backgroundLayers() == builderState.style().backgroundLayers()) |
| 812 | return; |
| 813 | |
| 814 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 815 | FillLayer* previousChild = nullptr; |
| 816 | for (auto* parent = &builderState.parentStyle().backgroundLayers(); parent && parent->isBlendModeSet(); parent = parent->next()) { |
| 817 | if (!child) { |
| 818 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 819 | child = previousChild->next(); |
| 820 | } |
| 821 | child->setBlendMode(parent->blendMode()); |
| 822 | previousChild = child; |
| 823 | child = previousChild->next(); |
| 824 | } |
| 825 | for (; child; child = child->next()) |
| 826 | child->clearBlendMode(); |
| 827 | } |
| 828 | static void applyValueBackgroundBlendMode(BuilderState& builderState, CSSValue& value) |
| 829 | { |
| 830 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 831 | FillLayer* previousChild = nullptr; |
| 832 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 833 | // Walk each value and put it into a layer, creating new layers as needed. |
| 834 | for (auto& item : downcast<CSSValueList>(value)) { |
| 835 | if (!child) { |
| 836 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 837 | child = previousChild->next(); |
| 838 | } |
| 839 | builderState.styleMap().mapFillBlendMode(CSSPropertyBackgroundBlendMode, *child, item); |
| 840 | previousChild = child; |
| 841 | child = child->next(); |
| 842 | } |
| 843 | } else { |
| 844 | builderState.styleMap().mapFillBlendMode(CSSPropertyBackgroundBlendMode, *child, value); |
| 845 | child = child->next(); |
| 846 | } |
| 847 | for (; child; child = child->next()) |
| 848 | child->clearBlendMode(); |
| 849 | } |
| 850 | static void applyInitialBackgroundClip(BuilderState& builderState) |
| 851 | { |
| 852 | // Check for (single-layer) no-op before clearing anything. |
| 853 | auto& layers = builderState.style().backgroundLayers(); |
| 854 | if (!layers.next() && (!layers.isClipSet() || layers.clip() == FillLayer::initialFillClip(FillLayerType::Background))) |
| 855 | return; |
| 856 | |
| 857 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 858 | child->setClip(FillLayer::initialFillClip(FillLayerType::Background)); |
| 859 | for (child = child->next(); child; child = child->next()) |
| 860 | child->clearClip(); |
| 861 | } |
| 862 | static void applyInheritBackgroundClip(BuilderState& builderState) |
| 863 | { |
| 864 | // Check for no-op before copying anything. |
| 865 | if (builderState.parentStyle().backgroundLayers() == builderState.style().backgroundLayers()) |
| 866 | return; |
| 867 | |
| 868 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 869 | FillLayer* previousChild = nullptr; |
| 870 | for (auto* parent = &builderState.parentStyle().backgroundLayers(); parent && parent->isClipSet(); parent = parent->next()) { |
| 871 | if (!child) { |
| 872 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 873 | child = previousChild->next(); |
| 874 | } |
| 875 | child->setClip(parent->clip()); |
| 876 | previousChild = child; |
| 877 | child = previousChild->next(); |
| 878 | } |
| 879 | for (; child; child = child->next()) |
| 880 | child->clearClip(); |
| 881 | } |
| 882 | static void applyValueBackgroundClip(BuilderState& builderState, CSSValue& value) |
| 883 | { |
| 884 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 885 | FillLayer* previousChild = nullptr; |
| 886 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 887 | // Walk each value and put it into a layer, creating new layers as needed. |
| 888 | for (auto& item : downcast<CSSValueList>(value)) { |
| 889 | if (!child) { |
| 890 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 891 | child = previousChild->next(); |
| 892 | } |
| 893 | builderState.styleMap().mapFillClip(CSSPropertyBackgroundClip, *child, item); |
| 894 | previousChild = child; |
| 895 | child = child->next(); |
| 896 | } |
| 897 | } else { |
| 898 | builderState.styleMap().mapFillClip(CSSPropertyBackgroundClip, *child, value); |
| 899 | child = child->next(); |
| 900 | } |
| 901 | for (; child; child = child->next()) |
| 902 | child->clearClip(); |
| 903 | } |
| 904 | static void applyInitialBackgroundColor(BuilderState& builderState) |
| 905 | { |
| 906 | if (builderState.applyPropertyToRegularStyle()) |
| 907 | builderState.style().setBackgroundColor(RenderStyle::initialBackgroundColor()); |
| 908 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 909 | builderState.style().setVisitedLinkBackgroundColor(RenderStyle::initialBackgroundColor()); |
| 910 | } |
| 911 | static void applyInheritBackgroundColor(BuilderState& builderState) |
| 912 | { |
| 913 | Color color = builderState.parentStyle().backgroundColor(); |
| 914 | if (builderState.applyPropertyToRegularStyle()) |
| 915 | builderState.style().setBackgroundColor(color); |
| 916 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 917 | builderState.style().setVisitedLinkBackgroundColor(color); |
| 918 | } |
| 919 | static void applyValueBackgroundColor(BuilderState& builderState, CSSValue& value) |
| 920 | { |
| 921 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
| 922 | if (builderState.applyPropertyToRegularStyle()) |
| 923 | builderState.style().setBackgroundColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
| 924 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 925 | builderState.style().setVisitedLinkBackgroundColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
| 926 | } |
| 927 | static void applyInitialBackgroundImage(BuilderState& builderState) |
| 928 | { |
| 929 | // Check for (single-layer) no-op before clearing anything. |
| 930 | auto& layers = builderState.style().backgroundLayers(); |
| 931 | if (!layers.next() && (!layers.isImageSet() || layers.image() == FillLayer::initialFillImage(FillLayerType::Background))) |
| 932 | return; |
| 933 | |
| 934 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 935 | child->setImage(FillLayer::initialFillImage(FillLayerType::Background)); |
| 936 | for (child = child->next(); child; child = child->next()) |
| 937 | child->clearImage(); |
| 938 | } |
| 939 | static void applyInheritBackgroundImage(BuilderState& builderState) |
| 940 | { |
| 941 | // Check for no-op before copying anything. |
| 942 | if (builderState.parentStyle().backgroundLayers() == builderState.style().backgroundLayers()) |
| 943 | return; |
| 944 | |
| 945 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 946 | FillLayer* previousChild = nullptr; |
| 947 | for (auto* parent = &builderState.parentStyle().backgroundLayers(); parent && parent->isImageSet(); parent = parent->next()) { |
| 948 | if (!child) { |
| 949 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 950 | child = previousChild->next(); |
| 951 | } |
| 952 | child->setImage(parent->image()); |
| 953 | previousChild = child; |
| 954 | child = previousChild->next(); |
| 955 | } |
| 956 | for (; child; child = child->next()) |
| 957 | child->clearImage(); |
| 958 | } |
| 959 | static void applyValueBackgroundImage(BuilderState& builderState, CSSValue& value) |
| 960 | { |
| 961 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 962 | FillLayer* previousChild = nullptr; |
| 963 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 964 | // Walk each value and put it into a layer, creating new layers as needed. |
| 965 | for (auto& item : downcast<CSSValueList>(value)) { |
| 966 | if (!child) { |
| 967 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 968 | child = previousChild->next(); |
| 969 | } |
| 970 | builderState.styleMap().mapFillImage(CSSPropertyBackgroundImage, *child, item); |
| 971 | previousChild = child; |
| 972 | child = child->next(); |
| 973 | } |
| 974 | } else { |
| 975 | builderState.styleMap().mapFillImage(CSSPropertyBackgroundImage, *child, value); |
| 976 | child = child->next(); |
| 977 | } |
| 978 | for (; child; child = child->next()) |
| 979 | child->clearImage(); |
| 980 | } |
| 981 | static void applyInitialBackgroundOrigin(BuilderState& builderState) |
| 982 | { |
| 983 | // Check for (single-layer) no-op before clearing anything. |
| 984 | auto& layers = builderState.style().backgroundLayers(); |
| 985 | if (!layers.next() && (!layers.isOriginSet() || layers.origin() == FillLayer::initialFillOrigin(FillLayerType::Background))) |
| 986 | return; |
| 987 | |
| 988 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 989 | child->setOrigin(FillLayer::initialFillOrigin(FillLayerType::Background)); |
| 990 | for (child = child->next(); child; child = child->next()) |
| 991 | child->clearOrigin(); |
| 992 | } |
| 993 | static void applyInheritBackgroundOrigin(BuilderState& builderState) |
| 994 | { |
| 995 | // Check for no-op before copying anything. |
| 996 | if (builderState.parentStyle().backgroundLayers() == builderState.style().backgroundLayers()) |
| 997 | return; |
| 998 | |
| 999 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1000 | FillLayer* previousChild = nullptr; |
| 1001 | for (auto* parent = &builderState.parentStyle().backgroundLayers(); parent && parent->isOriginSet(); parent = parent->next()) { |
| 1002 | if (!child) { |
| 1003 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 1004 | child = previousChild->next(); |
| 1005 | } |
| 1006 | child->setOrigin(parent->origin()); |
| 1007 | previousChild = child; |
| 1008 | child = previousChild->next(); |
| 1009 | } |
| 1010 | for (; child; child = child->next()) |
| 1011 | child->clearOrigin(); |
| 1012 | } |
| 1013 | static void applyValueBackgroundOrigin(BuilderState& builderState, CSSValue& value) |
| 1014 | { |
| 1015 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1016 | FillLayer* previousChild = nullptr; |
| 1017 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 1018 | // Walk each value and put it into a layer, creating new layers as needed. |
| 1019 | for (auto& item : downcast<CSSValueList>(value)) { |
| 1020 | if (!child) { |
| 1021 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 1022 | child = previousChild->next(); |
| 1023 | } |
| 1024 | builderState.styleMap().mapFillOrigin(CSSPropertyBackgroundOrigin, *child, item); |
| 1025 | previousChild = child; |
| 1026 | child = child->next(); |
| 1027 | } |
| 1028 | } else { |
| 1029 | builderState.styleMap().mapFillOrigin(CSSPropertyBackgroundOrigin, *child, value); |
| 1030 | child = child->next(); |
| 1031 | } |
| 1032 | for (; child; child = child->next()) |
| 1033 | child->clearOrigin(); |
| 1034 | } |
| 1035 | static void applyInitialBackgroundPositionX(BuilderState& builderState) |
| 1036 | { |
| 1037 | // Check for (single-layer) no-op before clearing anything. |
| 1038 | auto& layers = builderState.style().backgroundLayers(); |
| 1039 | if (!layers.next() && (!layers.isXPositionSet() || layers.xPosition() == FillLayer::initialFillXPosition(FillLayerType::Background))) |
| 1040 | return; |
| 1041 | |
| 1042 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1043 | child->setXPosition(FillLayer::initialFillXPosition(FillLayerType::Background)); |
| 1044 | for (child = child->next(); child; child = child->next()) |
| 1045 | child->clearXPosition(); |
| 1046 | } |
| 1047 | static void applyInheritBackgroundPositionX(BuilderState& builderState) |
| 1048 | { |
| 1049 | // Check for no-op before copying anything. |
| 1050 | if (builderState.parentStyle().backgroundLayers() == builderState.style().backgroundLayers()) |
| 1051 | return; |
| 1052 | |
| 1053 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1054 | FillLayer* previousChild = nullptr; |
| 1055 | for (auto* parent = &builderState.parentStyle().backgroundLayers(); parent && parent->isXPositionSet(); parent = parent->next()) { |
| 1056 | if (!child) { |
| 1057 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 1058 | child = previousChild->next(); |
| 1059 | } |
| 1060 | child->setXPosition(parent->xPosition()); |
| 1061 | previousChild = child; |
| 1062 | child = previousChild->next(); |
| 1063 | } |
| 1064 | for (; child; child = child->next()) |
| 1065 | child->clearXPosition(); |
| 1066 | } |
| 1067 | static void applyValueBackgroundPositionX(BuilderState& builderState, CSSValue& value) |
| 1068 | { |
| 1069 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1070 | FillLayer* previousChild = nullptr; |
| 1071 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 1072 | // Walk each value and put it into a layer, creating new layers as needed. |
| 1073 | for (auto& item : downcast<CSSValueList>(value)) { |
| 1074 | if (!child) { |
| 1075 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 1076 | child = previousChild->next(); |
| 1077 | } |
| 1078 | builderState.styleMap().mapFillXPosition(CSSPropertyBackgroundPositionX, *child, item); |
| 1079 | previousChild = child; |
| 1080 | child = child->next(); |
| 1081 | } |
| 1082 | } else { |
| 1083 | builderState.styleMap().mapFillXPosition(CSSPropertyBackgroundPositionX, *child, value); |
| 1084 | child = child->next(); |
| 1085 | } |
| 1086 | for (; child; child = child->next()) |
| 1087 | child->clearXPosition(); |
| 1088 | } |
| 1089 | static void applyInitialBackgroundPositionY(BuilderState& builderState) |
| 1090 | { |
| 1091 | // Check for (single-layer) no-op before clearing anything. |
| 1092 | auto& layers = builderState.style().backgroundLayers(); |
| 1093 | if (!layers.next() && (!layers.isYPositionSet() || layers.yPosition() == FillLayer::initialFillYPosition(FillLayerType::Background))) |
| 1094 | return; |
| 1095 | |
| 1096 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1097 | child->setYPosition(FillLayer::initialFillYPosition(FillLayerType::Background)); |
| 1098 | for (child = child->next(); child; child = child->next()) |
| 1099 | child->clearYPosition(); |
| 1100 | } |
| 1101 | static void applyInheritBackgroundPositionY(BuilderState& builderState) |
| 1102 | { |
| 1103 | // Check for no-op before copying anything. |
| 1104 | if (builderState.parentStyle().backgroundLayers() == builderState.style().backgroundLayers()) |
| 1105 | return; |
| 1106 | |
| 1107 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1108 | FillLayer* previousChild = nullptr; |
| 1109 | for (auto* parent = &builderState.parentStyle().backgroundLayers(); parent && parent->isYPositionSet(); parent = parent->next()) { |
| 1110 | if (!child) { |
| 1111 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 1112 | child = previousChild->next(); |
| 1113 | } |
| 1114 | child->setYPosition(parent->yPosition()); |
| 1115 | previousChild = child; |
| 1116 | child = previousChild->next(); |
| 1117 | } |
| 1118 | for (; child; child = child->next()) |
| 1119 | child->clearYPosition(); |
| 1120 | } |
| 1121 | static void applyValueBackgroundPositionY(BuilderState& builderState, CSSValue& value) |
| 1122 | { |
| 1123 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1124 | FillLayer* previousChild = nullptr; |
| 1125 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 1126 | // Walk each value and put it into a layer, creating new layers as needed. |
| 1127 | for (auto& item : downcast<CSSValueList>(value)) { |
| 1128 | if (!child) { |
| 1129 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 1130 | child = previousChild->next(); |
| 1131 | } |
| 1132 | builderState.styleMap().mapFillYPosition(CSSPropertyBackgroundPositionY, *child, item); |
| 1133 | previousChild = child; |
| 1134 | child = child->next(); |
| 1135 | } |
| 1136 | } else { |
| 1137 | builderState.styleMap().mapFillYPosition(CSSPropertyBackgroundPositionY, *child, value); |
| 1138 | child = child->next(); |
| 1139 | } |
| 1140 | for (; child; child = child->next()) |
| 1141 | child->clearYPosition(); |
| 1142 | } |
| 1143 | static void applyInitialBackgroundRepeatX(BuilderState& builderState) |
| 1144 | { |
| 1145 | // Check for (single-layer) no-op before clearing anything. |
| 1146 | auto& layers = builderState.style().backgroundLayers(); |
| 1147 | if (!layers.next() && (!layers.isRepeatXSet() || layers.repeatX() == FillLayer::initialFillRepeatX(FillLayerType::Background))) |
| 1148 | return; |
| 1149 | |
| 1150 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1151 | child->setRepeatX(FillLayer::initialFillRepeatX(FillLayerType::Background)); |
| 1152 | for (child = child->next(); child; child = child->next()) |
| 1153 | child->clearRepeatX(); |
| 1154 | } |
| 1155 | static void applyInheritBackgroundRepeatX(BuilderState& builderState) |
| 1156 | { |
| 1157 | // Check for no-op before copying anything. |
| 1158 | if (builderState.parentStyle().backgroundLayers() == builderState.style().backgroundLayers()) |
| 1159 | return; |
| 1160 | |
| 1161 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1162 | FillLayer* previousChild = nullptr; |
| 1163 | for (auto* parent = &builderState.parentStyle().backgroundLayers(); parent && parent->isRepeatXSet(); parent = parent->next()) { |
| 1164 | if (!child) { |
| 1165 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 1166 | child = previousChild->next(); |
| 1167 | } |
| 1168 | child->setRepeatX(parent->repeatX()); |
| 1169 | previousChild = child; |
| 1170 | child = previousChild->next(); |
| 1171 | } |
| 1172 | for (; child; child = child->next()) |
| 1173 | child->clearRepeatX(); |
| 1174 | } |
| 1175 | static void applyValueBackgroundRepeatX(BuilderState& builderState, CSSValue& value) |
| 1176 | { |
| 1177 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1178 | FillLayer* previousChild = nullptr; |
| 1179 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 1180 | // Walk each value and put it into a layer, creating new layers as needed. |
| 1181 | for (auto& item : downcast<CSSValueList>(value)) { |
| 1182 | if (!child) { |
| 1183 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 1184 | child = previousChild->next(); |
| 1185 | } |
| 1186 | builderState.styleMap().mapFillRepeatX(CSSPropertyBackgroundRepeatX, *child, item); |
| 1187 | previousChild = child; |
| 1188 | child = child->next(); |
| 1189 | } |
| 1190 | } else { |
| 1191 | builderState.styleMap().mapFillRepeatX(CSSPropertyBackgroundRepeatX, *child, value); |
| 1192 | child = child->next(); |
| 1193 | } |
| 1194 | for (; child; child = child->next()) |
| 1195 | child->clearRepeatX(); |
| 1196 | } |
| 1197 | static void applyInitialBackgroundRepeatY(BuilderState& builderState) |
| 1198 | { |
| 1199 | // Check for (single-layer) no-op before clearing anything. |
| 1200 | auto& layers = builderState.style().backgroundLayers(); |
| 1201 | if (!layers.next() && (!layers.isRepeatYSet() || layers.repeatY() == FillLayer::initialFillRepeatY(FillLayerType::Background))) |
| 1202 | return; |
| 1203 | |
| 1204 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1205 | child->setRepeatY(FillLayer::initialFillRepeatY(FillLayerType::Background)); |
| 1206 | for (child = child->next(); child; child = child->next()) |
| 1207 | child->clearRepeatY(); |
| 1208 | } |
| 1209 | static void applyInheritBackgroundRepeatY(BuilderState& builderState) |
| 1210 | { |
| 1211 | // Check for no-op before copying anything. |
| 1212 | if (builderState.parentStyle().backgroundLayers() == builderState.style().backgroundLayers()) |
| 1213 | return; |
| 1214 | |
| 1215 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1216 | FillLayer* previousChild = nullptr; |
| 1217 | for (auto* parent = &builderState.parentStyle().backgroundLayers(); parent && parent->isRepeatYSet(); parent = parent->next()) { |
| 1218 | if (!child) { |
| 1219 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 1220 | child = previousChild->next(); |
| 1221 | } |
| 1222 | child->setRepeatY(parent->repeatY()); |
| 1223 | previousChild = child; |
| 1224 | child = previousChild->next(); |
| 1225 | } |
| 1226 | for (; child; child = child->next()) |
| 1227 | child->clearRepeatY(); |
| 1228 | } |
| 1229 | static void applyValueBackgroundRepeatY(BuilderState& builderState, CSSValue& value) |
| 1230 | { |
| 1231 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1232 | FillLayer* previousChild = nullptr; |
| 1233 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 1234 | // Walk each value and put it into a layer, creating new layers as needed. |
| 1235 | for (auto& item : downcast<CSSValueList>(value)) { |
| 1236 | if (!child) { |
| 1237 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 1238 | child = previousChild->next(); |
| 1239 | } |
| 1240 | builderState.styleMap().mapFillRepeatY(CSSPropertyBackgroundRepeatY, *child, item); |
| 1241 | previousChild = child; |
| 1242 | child = child->next(); |
| 1243 | } |
| 1244 | } else { |
| 1245 | builderState.styleMap().mapFillRepeatY(CSSPropertyBackgroundRepeatY, *child, value); |
| 1246 | child = child->next(); |
| 1247 | } |
| 1248 | for (; child; child = child->next()) |
| 1249 | child->clearRepeatY(); |
| 1250 | } |
| 1251 | static void applyInitialBackgroundSize(BuilderState& builderState) |
| 1252 | { |
| 1253 | // Check for (single-layer) no-op before clearing anything. |
| 1254 | auto& layers = builderState.style().backgroundLayers(); |
| 1255 | if (!layers.next() && (!layers.isSizeSet() || layers.size() == FillLayer::initialFillSize(FillLayerType::Background))) |
| 1256 | return; |
| 1257 | |
| 1258 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1259 | child->setSize(FillLayer::initialFillSize(FillLayerType::Background)); |
| 1260 | for (child = child->next(); child; child = child->next()) |
| 1261 | child->clearSize(); |
| 1262 | } |
| 1263 | static void applyInheritBackgroundSize(BuilderState& builderState) |
| 1264 | { |
| 1265 | // Check for no-op before copying anything. |
| 1266 | if (builderState.parentStyle().backgroundLayers() == builderState.style().backgroundLayers()) |
| 1267 | return; |
| 1268 | |
| 1269 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1270 | FillLayer* previousChild = nullptr; |
| 1271 | for (auto* parent = &builderState.parentStyle().backgroundLayers(); parent && parent->isSizeSet(); parent = parent->next()) { |
| 1272 | if (!child) { |
| 1273 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 1274 | child = previousChild->next(); |
| 1275 | } |
| 1276 | child->setSize(parent->size()); |
| 1277 | previousChild = child; |
| 1278 | child = previousChild->next(); |
| 1279 | } |
| 1280 | for (; child; child = child->next()) |
| 1281 | child->clearSize(); |
| 1282 | } |
| 1283 | static void applyValueBackgroundSize(BuilderState& builderState, CSSValue& value) |
| 1284 | { |
| 1285 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 1286 | FillLayer* previousChild = nullptr; |
| 1287 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 1288 | // Walk each value and put it into a layer, creating new layers as needed. |
| 1289 | for (auto& item : downcast<CSSValueList>(value)) { |
| 1290 | if (!child) { |
| 1291 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 1292 | child = previousChild->next(); |
| 1293 | } |
| 1294 | builderState.styleMap().mapFillSize(CSSPropertyBackgroundSize, *child, item); |
| 1295 | previousChild = child; |
| 1296 | child = child->next(); |
| 1297 | } |
| 1298 | } else { |
| 1299 | builderState.styleMap().mapFillSize(CSSPropertyBackgroundSize, *child, value); |
| 1300 | child = child->next(); |
| 1301 | } |
| 1302 | for (; child; child = child->next()) |
| 1303 | child->clearSize(); |
| 1304 | } |
| 1305 | static void applyInitialBaselineShift(BuilderState& builderState) |
| 1306 | { |
| 1307 | builderState.style().accessSVGStyle().setBaselineShift(SVGRenderStyle::initialBaselineShift()); |
| 1308 | } |
| 1309 | static void applyInheritBaselineShift(BuilderState& builderState) |
| 1310 | { |
| 1311 | builderState.style().accessSVGStyle().setBaselineShift(forwardInheritedValue(builderState.parentStyle().svgStyle().baselineShift())); |
| 1312 | } |
| 1313 | static void applyInitialBorderBottomColor(BuilderState& builderState) |
| 1314 | { |
| 1315 | if (builderState.applyPropertyToRegularStyle()) |
| 1316 | builderState.style().setBorderBottomColor(RenderStyle::currentColor()); |
| 1317 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 1318 | builderState.style().setVisitedLinkBorderBottomColor(RenderStyle::currentColor()); |
| 1319 | } |
| 1320 | static void applyInheritBorderBottomColor(BuilderState& builderState) |
| 1321 | { |
| 1322 | Color color = builderState.parentStyle().borderBottomColor(); |
| 1323 | if (builderState.applyPropertyToRegularStyle()) |
| 1324 | builderState.style().setBorderBottomColor(color); |
| 1325 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 1326 | builderState.style().setVisitedLinkBorderBottomColor(color); |
| 1327 | } |
| 1328 | static void applyValueBorderBottomColor(BuilderState& builderState, CSSValue& value) |
| 1329 | { |
| 1330 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
| 1331 | if (builderState.applyPropertyToRegularStyle()) |
| 1332 | builderState.style().setBorderBottomColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
| 1333 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 1334 | builderState.style().setVisitedLinkBorderBottomColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
| 1335 | } |
| 1336 | static void applyInitialBorderBottomLeftRadius(BuilderState& builderState) |
| 1337 | { |
| 1338 | builderState.style().setBorderBottomLeftRadius(RenderStyle::initialBorderRadius()); |
| 1339 | } |
| 1340 | static void applyInitialBorderBottomRightRadius(BuilderState& builderState) |
| 1341 | { |
| 1342 | builderState.style().setBorderBottomRightRadius(RenderStyle::initialBorderRadius()); |
| 1343 | } |
| 1344 | static void applyInitialBorderBottomStyle(BuilderState& builderState) |
| 1345 | { |
| 1346 | builderState.style().setBorderBottomStyle(RenderStyle::initialBorderStyle()); |
| 1347 | } |
| 1348 | static void applyInheritBorderBottomStyle(BuilderState& builderState) |
| 1349 | { |
| 1350 | builderState.style().setBorderBottomStyle(forwardInheritedValue(builderState.parentStyle().borderBottomStyle())); |
| 1351 | } |
| 1352 | static void applyValueBorderBottomStyle(BuilderState& builderState, CSSValue& value) |
| 1353 | { |
| 1354 | builderState.style().setBorderBottomStyle(downcast<CSSPrimitiveValue>(value)); |
| 1355 | } |
| 1356 | static void applyInitialBorderBottomWidth(BuilderState& builderState) |
| 1357 | { |
| 1358 | builderState.style().setBorderBottomWidth(RenderStyle::initialBorderWidth()); |
| 1359 | } |
| 1360 | static void applyInheritBorderBottomWidth(BuilderState& builderState) |
| 1361 | { |
| 1362 | builderState.style().setBorderBottomWidth(forwardInheritedValue(builderState.parentStyle().borderBottomWidth())); |
| 1363 | } |
| 1364 | static void applyValueBorderBottomWidth(BuilderState& builderState, CSSValue& value) |
| 1365 | { |
| 1366 | builderState.style().setBorderBottomWidth(BuilderConverter::convertLineWidth<float>(builderState, value)); |
| 1367 | } |
| 1368 | static void applyInitialBorderCollapse(BuilderState& builderState) |
| 1369 | { |
| 1370 | builderState.style().setBorderCollapse(RenderStyle::initialBorderCollapse()); |
| 1371 | } |
| 1372 | static void applyInheritBorderCollapse(BuilderState& builderState) |
| 1373 | { |
| 1374 | builderState.style().setBorderCollapse(forwardInheritedValue(builderState.parentStyle().borderCollapse())); |
| 1375 | } |
| 1376 | static void applyValueBorderCollapse(BuilderState& builderState, CSSValue& value) |
| 1377 | { |
| 1378 | builderState.style().setBorderCollapse(downcast<CSSPrimitiveValue>(value)); |
| 1379 | } |
| 1380 | static void applyInitialBorderImageSource(BuilderState& builderState) |
| 1381 | { |
| 1382 | builderState.style().setBorderImageSource(RenderStyle::initialBorderImageSource()); |
| 1383 | } |
| 1384 | static void applyInheritBorderImageSource(BuilderState& builderState) |
| 1385 | { |
| 1386 | builderState.style().setBorderImageSource(forwardInheritedValue(builderState.parentStyle().borderImageSource())); |
| 1387 | } |
| 1388 | static void applyValueBorderImageSource(BuilderState& builderState, CSSValue& value) |
| 1389 | { |
| 1390 | builderState.style().setBorderImageSource(BuilderConverter::convertStyleImage<CSSPropertyBorderImageSource>(builderState, value)); |
| 1391 | } |
| 1392 | static void applyInitialBorderLeftColor(BuilderState& builderState) |
| 1393 | { |
| 1394 | if (builderState.applyPropertyToRegularStyle()) |
| 1395 | builderState.style().setBorderLeftColor(RenderStyle::currentColor()); |
| 1396 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 1397 | builderState.style().setVisitedLinkBorderLeftColor(RenderStyle::currentColor()); |
| 1398 | } |
| 1399 | static void applyInheritBorderLeftColor(BuilderState& builderState) |
| 1400 | { |
| 1401 | Color color = builderState.parentStyle().borderLeftColor(); |
| 1402 | if (builderState.applyPropertyToRegularStyle()) |
| 1403 | builderState.style().setBorderLeftColor(color); |
| 1404 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 1405 | builderState.style().setVisitedLinkBorderLeftColor(color); |
| 1406 | } |
| 1407 | static void applyValueBorderLeftColor(BuilderState& builderState, CSSValue& value) |
| 1408 | { |
| 1409 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
| 1410 | if (builderState.applyPropertyToRegularStyle()) |
| 1411 | builderState.style().setBorderLeftColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
| 1412 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 1413 | builderState.style().setVisitedLinkBorderLeftColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
| 1414 | } |
| 1415 | static void applyInitialBorderLeftStyle(BuilderState& builderState) |
| 1416 | { |
| 1417 | builderState.style().setBorderLeftStyle(RenderStyle::initialBorderStyle()); |
| 1418 | } |
| 1419 | static void applyInheritBorderLeftStyle(BuilderState& builderState) |
| 1420 | { |
| 1421 | builderState.style().setBorderLeftStyle(forwardInheritedValue(builderState.parentStyle().borderLeftStyle())); |
| 1422 | } |
| 1423 | static void applyValueBorderLeftStyle(BuilderState& builderState, CSSValue& value) |
| 1424 | { |
| 1425 | builderState.style().setBorderLeftStyle(downcast<CSSPrimitiveValue>(value)); |
| 1426 | } |
| 1427 | static void applyInitialBorderLeftWidth(BuilderState& builderState) |
| 1428 | { |
| 1429 | builderState.style().setBorderLeftWidth(RenderStyle::initialBorderWidth()); |
| 1430 | } |
| 1431 | static void applyInheritBorderLeftWidth(BuilderState& builderState) |
| 1432 | { |
| 1433 | builderState.style().setBorderLeftWidth(forwardInheritedValue(builderState.parentStyle().borderLeftWidth())); |
| 1434 | } |
| 1435 | static void applyValueBorderLeftWidth(BuilderState& builderState, CSSValue& value) |
| 1436 | { |
| 1437 | builderState.style().setBorderLeftWidth(BuilderConverter::convertLineWidth<float>(builderState, value)); |
| 1438 | } |
| 1439 | static void applyInitialBorderRightColor(BuilderState& builderState) |
| 1440 | { |
| 1441 | if (builderState.applyPropertyToRegularStyle()) |
| 1442 | builderState.style().setBorderRightColor(RenderStyle::currentColor()); |
| 1443 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 1444 | builderState.style().setVisitedLinkBorderRightColor(RenderStyle::currentColor()); |
| 1445 | } |
| 1446 | static void applyInheritBorderRightColor(BuilderState& builderState) |
| 1447 | { |
| 1448 | Color color = builderState.parentStyle().borderRightColor(); |
| 1449 | if (builderState.applyPropertyToRegularStyle()) |
| 1450 | builderState.style().setBorderRightColor(color); |
| 1451 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 1452 | builderState.style().setVisitedLinkBorderRightColor(color); |
| 1453 | } |
| 1454 | static void applyValueBorderRightColor(BuilderState& builderState, CSSValue& value) |
| 1455 | { |
| 1456 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
| 1457 | if (builderState.applyPropertyToRegularStyle()) |
| 1458 | builderState.style().setBorderRightColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
| 1459 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 1460 | builderState.style().setVisitedLinkBorderRightColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
| 1461 | } |
| 1462 | static void applyInitialBorderRightStyle(BuilderState& builderState) |
| 1463 | { |
| 1464 | builderState.style().setBorderRightStyle(RenderStyle::initialBorderStyle()); |
| 1465 | } |
| 1466 | static void applyInheritBorderRightStyle(BuilderState& builderState) |
| 1467 | { |
| 1468 | builderState.style().setBorderRightStyle(forwardInheritedValue(builderState.parentStyle().borderRightStyle())); |
| 1469 | } |
| 1470 | static void applyValueBorderRightStyle(BuilderState& builderState, CSSValue& value) |
| 1471 | { |
| 1472 | builderState.style().setBorderRightStyle(downcast<CSSPrimitiveValue>(value)); |
| 1473 | } |
| 1474 | static void applyInitialBorderRightWidth(BuilderState& builderState) |
| 1475 | { |
| 1476 | builderState.style().setBorderRightWidth(RenderStyle::initialBorderWidth()); |
| 1477 | } |
| 1478 | static void applyInheritBorderRightWidth(BuilderState& builderState) |
| 1479 | { |
| 1480 | builderState.style().setBorderRightWidth(forwardInheritedValue(builderState.parentStyle().borderRightWidth())); |
| 1481 | } |
| 1482 | static void applyValueBorderRightWidth(BuilderState& builderState, CSSValue& value) |
| 1483 | { |
| 1484 | builderState.style().setBorderRightWidth(BuilderConverter::convertLineWidth<float>(builderState, value)); |
| 1485 | } |
| 1486 | static void applyInitialBorderTopColor(BuilderState& builderState) |
| 1487 | { |
| 1488 | if (builderState.applyPropertyToRegularStyle()) |
| 1489 | builderState.style().setBorderTopColor(RenderStyle::currentColor()); |
| 1490 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 1491 | builderState.style().setVisitedLinkBorderTopColor(RenderStyle::currentColor()); |
| 1492 | } |
| 1493 | static void applyInheritBorderTopColor(BuilderState& builderState) |
| 1494 | { |
| 1495 | Color color = builderState.parentStyle().borderTopColor(); |
| 1496 | if (builderState.applyPropertyToRegularStyle()) |
| 1497 | builderState.style().setBorderTopColor(color); |
| 1498 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 1499 | builderState.style().setVisitedLinkBorderTopColor(color); |
| 1500 | } |
| 1501 | static void applyValueBorderTopColor(BuilderState& builderState, CSSValue& value) |
| 1502 | { |
| 1503 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
| 1504 | if (builderState.applyPropertyToRegularStyle()) |
| 1505 | builderState.style().setBorderTopColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
| 1506 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 1507 | builderState.style().setVisitedLinkBorderTopColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
| 1508 | } |
| 1509 | static void applyInitialBorderTopLeftRadius(BuilderState& builderState) |
| 1510 | { |
| 1511 | builderState.style().setBorderTopLeftRadius(RenderStyle::initialBorderRadius()); |
| 1512 | } |
| 1513 | static void applyInitialBorderTopRightRadius(BuilderState& builderState) |
| 1514 | { |
| 1515 | builderState.style().setBorderTopRightRadius(RenderStyle::initialBorderRadius()); |
| 1516 | } |
| 1517 | static void applyInitialBorderTopStyle(BuilderState& builderState) |
| 1518 | { |
| 1519 | builderState.style().setBorderTopStyle(RenderStyle::initialBorderStyle()); |
| 1520 | } |
| 1521 | static void applyInheritBorderTopStyle(BuilderState& builderState) |
| 1522 | { |
| 1523 | builderState.style().setBorderTopStyle(forwardInheritedValue(builderState.parentStyle().borderTopStyle())); |
| 1524 | } |
| 1525 | static void applyValueBorderTopStyle(BuilderState& builderState, CSSValue& value) |
| 1526 | { |
| 1527 | builderState.style().setBorderTopStyle(downcast<CSSPrimitiveValue>(value)); |
| 1528 | } |
| 1529 | static void applyInitialBorderTopWidth(BuilderState& builderState) |
| 1530 | { |
| 1531 | builderState.style().setBorderTopWidth(RenderStyle::initialBorderWidth()); |
| 1532 | } |
| 1533 | static void applyInheritBorderTopWidth(BuilderState& builderState) |
| 1534 | { |
| 1535 | builderState.style().setBorderTopWidth(forwardInheritedValue(builderState.parentStyle().borderTopWidth())); |
| 1536 | } |
| 1537 | static void applyValueBorderTopWidth(BuilderState& builderState, CSSValue& value) |
| 1538 | { |
| 1539 | builderState.style().setBorderTopWidth(BuilderConverter::convertLineWidth<float>(builderState, value)); |
| 1540 | } |
| 1541 | static void applyInitialBottom(BuilderState& builderState) |
| 1542 | { |
| 1543 | builderState.style().setBottom(RenderStyle::initialOffset()); |
| 1544 | } |
| 1545 | static void applyInheritBottom(BuilderState& builderState) |
| 1546 | { |
| 1547 | builderState.style().setBottom(forwardInheritedValue(builderState.parentStyle().bottom())); |
| 1548 | } |
| 1549 | static void applyValueBottom(BuilderState& builderState, CSSValue& value) |
| 1550 | { |
| 1551 | builderState.style().setBottom(BuilderConverter::convertLengthOrAuto(builderState, value)); |
| 1552 | } |
| 1553 | static void applyInitialBoxSizing(BuilderState& builderState) |
| 1554 | { |
| 1555 | builderState.style().setBoxSizing(RenderStyle::initialBoxSizing()); |
| 1556 | } |
| 1557 | static void applyInheritBoxSizing(BuilderState& builderState) |
| 1558 | { |
| 1559 | builderState.style().setBoxSizing(forwardInheritedValue(builderState.parentStyle().boxSizing())); |
| 1560 | } |
| 1561 | static void applyValueBoxSizing(BuilderState& builderState, CSSValue& value) |
| 1562 | { |
| 1563 | builderState.style().setBoxSizing(downcast<CSSPrimitiveValue>(value)); |
| 1564 | } |
| 1565 | static void applyInitialBreakAfter(BuilderState& builderState) |
| 1566 | { |
| 1567 | builderState.style().setBreakAfter(RenderStyle::initialBreakBetween()); |
| 1568 | } |
| 1569 | static void applyInheritBreakAfter(BuilderState& builderState) |
| 1570 | { |
| 1571 | builderState.style().setBreakAfter(forwardInheritedValue(builderState.parentStyle().breakAfter())); |
| 1572 | } |
| 1573 | static void applyValueBreakAfter(BuilderState& builderState, CSSValue& value) |
| 1574 | { |
| 1575 | builderState.style().setBreakAfter(downcast<CSSPrimitiveValue>(value)); |
| 1576 | } |
| 1577 | static void applyInitialBreakBefore(BuilderState& builderState) |
| 1578 | { |
| 1579 | builderState.style().setBreakBefore(RenderStyle::initialBreakBetween()); |
| 1580 | } |
| 1581 | static void applyInheritBreakBefore(BuilderState& builderState) |
| 1582 | { |
| 1583 | builderState.style().setBreakBefore(forwardInheritedValue(builderState.parentStyle().breakBefore())); |
| 1584 | } |
| 1585 | static void applyValueBreakBefore(BuilderState& builderState, CSSValue& value) |
| 1586 | { |
| 1587 | builderState.style().setBreakBefore(downcast<CSSPrimitiveValue>(value)); |
| 1588 | } |
| 1589 | static void applyInitialBreakInside(BuilderState& builderState) |
| 1590 | { |
| 1591 | builderState.style().setBreakInside(RenderStyle::initialBreakInside()); |
| 1592 | } |
| 1593 | static void applyInheritBreakInside(BuilderState& builderState) |
| 1594 | { |
| 1595 | builderState.style().setBreakInside(forwardInheritedValue(builderState.parentStyle().breakInside())); |
| 1596 | } |
| 1597 | static void applyValueBreakInside(BuilderState& builderState, CSSValue& value) |
| 1598 | { |
| 1599 | builderState.style().setBreakInside(downcast<CSSPrimitiveValue>(value)); |
| 1600 | } |
| 1601 | static void applyInitialBufferedRendering(BuilderState& builderState) |
| 1602 | { |
| 1603 | builderState.style().accessSVGStyle().setBufferedRendering(SVGRenderStyle::initialBufferedRendering()); |
| 1604 | } |
| 1605 | static void applyInheritBufferedRendering(BuilderState& builderState) |
| 1606 | { |
| 1607 | builderState.style().accessSVGStyle().setBufferedRendering(forwardInheritedValue(builderState.parentStyle().svgStyle().bufferedRendering())); |
| 1608 | } |
| 1609 | static void applyValueBufferedRendering(BuilderState& builderState, CSSValue& value) |
| 1610 | { |
| 1611 | builderState.style().accessSVGStyle().setBufferedRendering(downcast<CSSPrimitiveValue>(value)); |
| 1612 | } |
| 1613 | static void applyInitialCaptionSide(BuilderState& builderState) |
| 1614 | { |
| 1615 | builderState.style().setCaptionSide(RenderStyle::initialCaptionSide()); |
| 1616 | } |
| 1617 | static void applyInheritCaptionSide(BuilderState& builderState) |
| 1618 | { |
| 1619 | builderState.style().setCaptionSide(forwardInheritedValue(builderState.parentStyle().captionSide())); |
| 1620 | } |
| 1621 | static void applyValueCaptionSide(BuilderState& builderState, CSSValue& value) |
| 1622 | { |
| 1623 | builderState.style().setCaptionSide(downcast<CSSPrimitiveValue>(value)); |
| 1624 | } |
| 1625 | static void applyInitialClear(BuilderState& builderState) |
| 1626 | { |
| 1627 | builderState.style().setClear(RenderStyle::initialClear()); |
| 1628 | } |
| 1629 | static void applyInheritClear(BuilderState& builderState) |
| 1630 | { |
| 1631 | builderState.style().setClear(forwardInheritedValue(builderState.parentStyle().clear())); |
| 1632 | } |
| 1633 | static void applyValueClear(BuilderState& builderState, CSSValue& value) |
| 1634 | { |
| 1635 | builderState.style().setClear(downcast<CSSPrimitiveValue>(value)); |
| 1636 | } |
| 1637 | static void applyInitialClipPath(BuilderState& builderState) |
| 1638 | { |
| 1639 | builderState.style().setClipPath(RenderStyle::initialClipPath()); |
| 1640 | } |
| 1641 | static void applyInheritClipPath(BuilderState& builderState) |
| 1642 | { |
| 1643 | builderState.style().setClipPath(forwardInheritedValue(builderState.parentStyle().clipPath())); |
| 1644 | } |
| 1645 | static void applyValueClipPath(BuilderState& builderState, CSSValue& value) |
| 1646 | { |
| 1647 | builderState.style().setClipPath(BuilderConverter::convertClipPath(builderState, value)); |
| 1648 | } |
| 1649 | static void applyInitialClipRule(BuilderState& builderState) |
| 1650 | { |
| 1651 | builderState.style().accessSVGStyle().setClipRule(SVGRenderStyle::initialClipRule()); |
| 1652 | } |
| 1653 | static void applyInheritClipRule(BuilderState& builderState) |
| 1654 | { |
| 1655 | builderState.style().accessSVGStyle().setClipRule(forwardInheritedValue(builderState.parentStyle().svgStyle().clipRule())); |
| 1656 | } |
| 1657 | static void applyValueClipRule(BuilderState& builderState, CSSValue& value) |
| 1658 | { |
| 1659 | builderState.style().accessSVGStyle().setClipRule(downcast<CSSPrimitiveValue>(value)); |
| 1660 | } |
| 1661 | static void applyInitialColorInterpolation(BuilderState& builderState) |
| 1662 | { |
| 1663 | builderState.style().accessSVGStyle().setColorInterpolation(SVGRenderStyle::initialColorInterpolation()); |
| 1664 | } |
| 1665 | static void applyInheritColorInterpolation(BuilderState& builderState) |
| 1666 | { |
| 1667 | builderState.style().accessSVGStyle().setColorInterpolation(forwardInheritedValue(builderState.parentStyle().svgStyle().colorInterpolation())); |
| 1668 | } |
| 1669 | static void applyValueColorInterpolation(BuilderState& builderState, CSSValue& value) |
| 1670 | { |
| 1671 | builderState.style().accessSVGStyle().setColorInterpolation(downcast<CSSPrimitiveValue>(value)); |
| 1672 | } |
| 1673 | static void applyInitialColorInterpolationFilters(BuilderState& builderState) |
| 1674 | { |
| 1675 | builderState.style().accessSVGStyle().setColorInterpolationFilters(SVGRenderStyle::initialColorInterpolationFilters()); |
| 1676 | } |
| 1677 | static void applyInheritColorInterpolationFilters(BuilderState& builderState) |
| 1678 | { |
| 1679 | builderState.style().accessSVGStyle().setColorInterpolationFilters(forwardInheritedValue(builderState.parentStyle().svgStyle().colorInterpolationFilters())); |
| 1680 | } |
| 1681 | static void applyValueColorInterpolationFilters(BuilderState& builderState, CSSValue& value) |
| 1682 | { |
| 1683 | builderState.style().accessSVGStyle().setColorInterpolationFilters(downcast<CSSPrimitiveValue>(value)); |
| 1684 | } |
| 1685 | static void applyInitialColorRendering(BuilderState& builderState) |
| 1686 | { |
| 1687 | builderState.style().accessSVGStyle().setColorRendering(SVGRenderStyle::initialColorRendering()); |
| 1688 | } |
| 1689 | static void applyInheritColorRendering(BuilderState& builderState) |
| 1690 | { |
| 1691 | builderState.style().accessSVGStyle().setColorRendering(forwardInheritedValue(builderState.parentStyle().svgStyle().colorRendering())); |
| 1692 | } |
| 1693 | static void applyValueColorRendering(BuilderState& builderState, CSSValue& value) |
| 1694 | { |
| 1695 | builderState.style().accessSVGStyle().setColorRendering(downcast<CSSPrimitiveValue>(value)); |
| 1696 | } |
| 1697 | static void applyInitialColumnCount(BuilderState& builderState) |
| 1698 | { |
| 1699 | builderState.style().setHasAutoColumnCount(); |
| 1700 | } |
| 1701 | static void applyInheritColumnCount(BuilderState& builderState) |
| 1702 | { |
| 1703 | if (builderState.parentStyle().hasAutoColumnCount()) { |
| 1704 | builderState.style().setHasAutoColumnCount(); |
| 1705 | return; |
| 1706 | } |
| 1707 | builderState.style().setColumnCount(forwardInheritedValue(builderState.parentStyle().columnCount())); |
| 1708 | } |
| 1709 | static void applyValueColumnCount(BuilderState& builderState, CSSValue& value) |
| 1710 | { |
| 1711 | if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto) { |
| 1712 | builderState.style().setHasAutoColumnCount(); |
| 1713 | return; |
| 1714 | } |
| 1715 | builderState.style().setColumnCount(downcast<CSSPrimitiveValue>(value)); |
| 1716 | } |
| 1717 | static void applyInitialColumnFill(BuilderState& builderState) |
| 1718 | { |
| 1719 | builderState.style().setColumnFill(RenderStyle::initialColumnFill()); |
| 1720 | } |
| 1721 | static void applyInheritColumnFill(BuilderState& builderState) |
| 1722 | { |
| 1723 | builderState.style().setColumnFill(forwardInheritedValue(builderState.parentStyle().columnFill())); |
| 1724 | } |
| 1725 | static void applyValueColumnFill(BuilderState& builderState, CSSValue& value) |
| 1726 | { |
| 1727 | builderState.style().setColumnFill(downcast<CSSPrimitiveValue>(value)); |
| 1728 | } |
| 1729 | static void applyInitialColumnGap(BuilderState& builderState) |
| 1730 | { |
| 1731 | builderState.style().setColumnGap(RenderStyle::initialColumnGap()); |
| 1732 | } |
| 1733 | static void applyInheritColumnGap(BuilderState& builderState) |
| 1734 | { |
| 1735 | builderState.style().setColumnGap(forwardInheritedValue(builderState.parentStyle().columnGap())); |
| 1736 | } |
| 1737 | static void applyValueColumnGap(BuilderState& builderState, CSSValue& value) |
| 1738 | { |
| 1739 | builderState.style().setColumnGap(BuilderConverter::convertGapLength(builderState, value)); |
| 1740 | } |
| 1741 | static void applyInitialColumnRuleColor(BuilderState& builderState) |
| 1742 | { |
| 1743 | if (builderState.applyPropertyToRegularStyle()) |
| 1744 | builderState.style().setColumnRuleColor(RenderStyle::currentColor()); |
| 1745 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 1746 | builderState.style().setVisitedLinkColumnRuleColor(RenderStyle::currentColor()); |
| 1747 | } |
| 1748 | static void applyInheritColumnRuleColor(BuilderState& builderState) |
| 1749 | { |
| 1750 | Color color = builderState.parentStyle().columnRuleColor(); |
| 1751 | if (builderState.applyPropertyToRegularStyle()) |
| 1752 | builderState.style().setColumnRuleColor(color); |
| 1753 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 1754 | builderState.style().setVisitedLinkColumnRuleColor(color); |
| 1755 | } |
| 1756 | static void applyValueColumnRuleColor(BuilderState& builderState, CSSValue& value) |
| 1757 | { |
| 1758 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
| 1759 | if (builderState.applyPropertyToRegularStyle()) |
| 1760 | builderState.style().setColumnRuleColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
| 1761 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 1762 | builderState.style().setVisitedLinkColumnRuleColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
| 1763 | } |
| 1764 | static void applyInitialColumnRuleStyle(BuilderState& builderState) |
| 1765 | { |
| 1766 | builderState.style().setColumnRuleStyle(RenderStyle::initialBorderStyle()); |
| 1767 | } |
| 1768 | static void applyInheritColumnRuleStyle(BuilderState& builderState) |
| 1769 | { |
| 1770 | builderState.style().setColumnRuleStyle(forwardInheritedValue(builderState.parentStyle().columnRuleStyle())); |
| 1771 | } |
| 1772 | static void applyValueColumnRuleStyle(BuilderState& builderState, CSSValue& value) |
| 1773 | { |
| 1774 | builderState.style().setColumnRuleStyle(downcast<CSSPrimitiveValue>(value)); |
| 1775 | } |
| 1776 | static void applyInitialColumnRuleWidth(BuilderState& builderState) |
| 1777 | { |
| 1778 | builderState.style().setColumnRuleWidth(RenderStyle::initialColumnRuleWidth()); |
| 1779 | } |
| 1780 | static void applyInheritColumnRuleWidth(BuilderState& builderState) |
| 1781 | { |
| 1782 | builderState.style().setColumnRuleWidth(forwardInheritedValue(builderState.parentStyle().columnRuleWidth())); |
| 1783 | } |
| 1784 | static void applyValueColumnRuleWidth(BuilderState& builderState, CSSValue& value) |
| 1785 | { |
| 1786 | builderState.style().setColumnRuleWidth(BuilderConverter::convertLineWidth<unsigned short>(builderState, value)); |
| 1787 | } |
| 1788 | static void applyInitialColumnSpan(BuilderState& builderState) |
| 1789 | { |
| 1790 | builderState.style().setColumnSpan(RenderStyle::initialColumnSpan()); |
| 1791 | } |
| 1792 | static void applyInheritColumnSpan(BuilderState& builderState) |
| 1793 | { |
| 1794 | builderState.style().setColumnSpan(forwardInheritedValue(builderState.parentStyle().columnSpan())); |
| 1795 | } |
| 1796 | static void applyValueColumnSpan(BuilderState& builderState, CSSValue& value) |
| 1797 | { |
| 1798 | builderState.style().setColumnSpan(downcast<CSSPrimitiveValue>(value)); |
| 1799 | } |
| 1800 | static void applyInitialColumnWidth(BuilderState& builderState) |
| 1801 | { |
| 1802 | builderState.style().setHasAutoColumnWidth(); |
| 1803 | } |
| 1804 | static void applyInheritColumnWidth(BuilderState& builderState) |
| 1805 | { |
| 1806 | if (builderState.parentStyle().hasAutoColumnWidth()) { |
| 1807 | builderState.style().setHasAutoColumnWidth(); |
| 1808 | return; |
| 1809 | } |
| 1810 | builderState.style().setColumnWidth(forwardInheritedValue(builderState.parentStyle().columnWidth())); |
| 1811 | } |
| 1812 | static void applyValueColumnWidth(BuilderState& builderState, CSSValue& value) |
| 1813 | { |
| 1814 | if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto) { |
| 1815 | builderState.style().setHasAutoColumnWidth(); |
| 1816 | return; |
| 1817 | } |
| 1818 | builderState.style().setColumnWidth(BuilderConverter::convertComputedLength<float>(builderState, value)); |
| 1819 | } |
| 1820 | static void applyInitialCx(BuilderState& builderState) |
| 1821 | { |
| 1822 | builderState.style().setCx(RenderStyle::initialZeroLength()); |
| 1823 | } |
| 1824 | static void applyInheritCx(BuilderState& builderState) |
| 1825 | { |
| 1826 | builderState.style().setCx(forwardInheritedValue(builderState.parentStyle().cx())); |
| 1827 | } |
| 1828 | static void applyValueCx(BuilderState& builderState, CSSValue& value) |
| 1829 | { |
| 1830 | builderState.style().setCx(BuilderConverter::convertLength(builderState, value)); |
| 1831 | } |
| 1832 | static void applyInitialCy(BuilderState& builderState) |
| 1833 | { |
| 1834 | builderState.style().setCy(RenderStyle::initialZeroLength()); |
| 1835 | } |
| 1836 | static void applyInheritCy(BuilderState& builderState) |
| 1837 | { |
| 1838 | builderState.style().setCy(forwardInheritedValue(builderState.parentStyle().cy())); |
| 1839 | } |
| 1840 | static void applyValueCy(BuilderState& builderState, CSSValue& value) |
| 1841 | { |
| 1842 | builderState.style().setCy(BuilderConverter::convertLength(builderState, value)); |
| 1843 | } |
| 1844 | static void applyInitialDominantBaseline(BuilderState& builderState) |
| 1845 | { |
| 1846 | builderState.style().accessSVGStyle().setDominantBaseline(SVGRenderStyle::initialDominantBaseline()); |
| 1847 | } |
| 1848 | static void applyInheritDominantBaseline(BuilderState& builderState) |
| 1849 | { |
| 1850 | builderState.style().accessSVGStyle().setDominantBaseline(forwardInheritedValue(builderState.parentStyle().svgStyle().dominantBaseline())); |
| 1851 | } |
| 1852 | static void applyValueDominantBaseline(BuilderState& builderState, CSSValue& value) |
| 1853 | { |
| 1854 | builderState.style().accessSVGStyle().setDominantBaseline(downcast<CSSPrimitiveValue>(value)); |
| 1855 | } |
| 1856 | static void applyInitialEmptyCells(BuilderState& builderState) |
| 1857 | { |
| 1858 | builderState.style().setEmptyCells(RenderStyle::initialEmptyCells()); |
| 1859 | } |
| 1860 | static void applyInheritEmptyCells(BuilderState& builderState) |
| 1861 | { |
| 1862 | builderState.style().setEmptyCells(forwardInheritedValue(builderState.parentStyle().emptyCells())); |
| 1863 | } |
| 1864 | static void applyValueEmptyCells(BuilderState& builderState, CSSValue& value) |
| 1865 | { |
| 1866 | builderState.style().setEmptyCells(downcast<CSSPrimitiveValue>(value)); |
| 1867 | } |
| 1868 | static void applyInitialFillOpacity(BuilderState& builderState) |
| 1869 | { |
| 1870 | builderState.style().accessSVGStyle().setFillOpacity(SVGRenderStyle::initialFillOpacity()); |
| 1871 | } |
| 1872 | static void applyInheritFillOpacity(BuilderState& builderState) |
| 1873 | { |
| 1874 | builderState.style().accessSVGStyle().setFillOpacity(forwardInheritedValue(builderState.parentStyle().svgStyle().fillOpacity())); |
| 1875 | } |
| 1876 | static void applyValueFillOpacity(BuilderState& builderState, CSSValue& value) |
| 1877 | { |
| 1878 | builderState.style().accessSVGStyle().setFillOpacity(BuilderConverter::convertOpacity(builderState, value)); |
| 1879 | } |
| 1880 | static void applyInitialFillRule(BuilderState& builderState) |
| 1881 | { |
| 1882 | builderState.style().accessSVGStyle().setFillRule(SVGRenderStyle::initialFillRule()); |
| 1883 | } |
| 1884 | static void applyInheritFillRule(BuilderState& builderState) |
| 1885 | { |
| 1886 | builderState.style().accessSVGStyle().setFillRule(forwardInheritedValue(builderState.parentStyle().svgStyle().fillRule())); |
| 1887 | } |
| 1888 | static void applyValueFillRule(BuilderState& builderState, CSSValue& value) |
| 1889 | { |
| 1890 | builderState.style().accessSVGStyle().setFillRule(downcast<CSSPrimitiveValue>(value)); |
| 1891 | } |
| 1892 | static void applyInitialFilter(BuilderState& builderState) |
| 1893 | { |
| 1894 | builderState.style().setFilter(RenderStyle::initialFilter()); |
| 1895 | } |
| 1896 | static void applyInheritFilter(BuilderState& builderState) |
| 1897 | { |
| 1898 | builderState.style().setFilter(forwardInheritedValue(builderState.parentStyle().filter())); |
| 1899 | } |
| 1900 | static void applyValueFilter(BuilderState& builderState, CSSValue& value) |
| 1901 | { |
| 1902 | auto convertedValue = BuilderConverter::convertFilterOperations(builderState, value); |
| 1903 | if (convertedValue) |
| 1904 | builderState.style().setFilter(WTFMove(convertedValue.value())); |
| 1905 | } |
| 1906 | static void applyInitialFlexBasis(BuilderState& builderState) |
| 1907 | { |
| 1908 | builderState.style().setFlexBasis(RenderStyle::initialFlexBasis()); |
| 1909 | } |
| 1910 | static void applyInheritFlexBasis(BuilderState& builderState) |
| 1911 | { |
| 1912 | builderState.style().setFlexBasis(forwardInheritedValue(builderState.parentStyle().flexBasis())); |
| 1913 | } |
| 1914 | static void applyValueFlexBasis(BuilderState& builderState, CSSValue& value) |
| 1915 | { |
| 1916 | builderState.style().setFlexBasis(BuilderConverter::convertLengthOrAuto(builderState, value)); |
| 1917 | } |
| 1918 | static void applyInitialFlexDirection(BuilderState& builderState) |
| 1919 | { |
| 1920 | builderState.style().setFlexDirection(RenderStyle::initialFlexDirection()); |
| 1921 | } |
| 1922 | static void applyInheritFlexDirection(BuilderState& builderState) |
| 1923 | { |
| 1924 | builderState.style().setFlexDirection(forwardInheritedValue(builderState.parentStyle().flexDirection())); |
| 1925 | } |
| 1926 | static void applyValueFlexDirection(BuilderState& builderState, CSSValue& value) |
| 1927 | { |
| 1928 | builderState.style().setFlexDirection(downcast<CSSPrimitiveValue>(value)); |
| 1929 | } |
| 1930 | static void applyInitialFlexGrow(BuilderState& builderState) |
| 1931 | { |
| 1932 | builderState.style().setFlexGrow(RenderStyle::initialFlexGrow()); |
| 1933 | } |
| 1934 | static void applyInheritFlexGrow(BuilderState& builderState) |
| 1935 | { |
| 1936 | builderState.style().setFlexGrow(forwardInheritedValue(builderState.parentStyle().flexGrow())); |
| 1937 | } |
| 1938 | static void applyValueFlexGrow(BuilderState& builderState, CSSValue& value) |
| 1939 | { |
| 1940 | builderState.style().setFlexGrow(downcast<CSSPrimitiveValue>(value)); |
| 1941 | } |
| 1942 | static void applyInitialFlexShrink(BuilderState& builderState) |
| 1943 | { |
| 1944 | builderState.style().setFlexShrink(RenderStyle::initialFlexShrink()); |
| 1945 | } |
| 1946 | static void applyInheritFlexShrink(BuilderState& builderState) |
| 1947 | { |
| 1948 | builderState.style().setFlexShrink(forwardInheritedValue(builderState.parentStyle().flexShrink())); |
| 1949 | } |
| 1950 | static void applyValueFlexShrink(BuilderState& builderState, CSSValue& value) |
| 1951 | { |
| 1952 | builderState.style().setFlexShrink(downcast<CSSPrimitiveValue>(value)); |
| 1953 | } |
| 1954 | static void applyInitialFlexWrap(BuilderState& builderState) |
| 1955 | { |
| 1956 | builderState.style().setFlexWrap(RenderStyle::initialFlexWrap()); |
| 1957 | } |
| 1958 | static void applyInheritFlexWrap(BuilderState& builderState) |
| 1959 | { |
| 1960 | builderState.style().setFlexWrap(forwardInheritedValue(builderState.parentStyle().flexWrap())); |
| 1961 | } |
| 1962 | static void applyValueFlexWrap(BuilderState& builderState, CSSValue& value) |
| 1963 | { |
| 1964 | builderState.style().setFlexWrap(downcast<CSSPrimitiveValue>(value)); |
| 1965 | } |
| 1966 | static void applyInitialFloat(BuilderState& builderState) |
| 1967 | { |
| 1968 | builderState.style().setFloating(RenderStyle::initialFloating()); |
| 1969 | } |
| 1970 | static void applyInheritFloat(BuilderState& builderState) |
| 1971 | { |
| 1972 | builderState.style().setFloating(forwardInheritedValue(builderState.parentStyle().floating())); |
| 1973 | } |
| 1974 | static void applyValueFloat(BuilderState& builderState, CSSValue& value) |
| 1975 | { |
| 1976 | builderState.style().setFloating(downcast<CSSPrimitiveValue>(value)); |
| 1977 | } |
| 1978 | static void applyInitialFloodColor(BuilderState& builderState) |
| 1979 | { |
| 1980 | builderState.style().accessSVGStyle().setFloodColor(SVGRenderStyle::initialFloodColor()); |
| 1981 | } |
| 1982 | static void applyInheritFloodColor(BuilderState& builderState) |
| 1983 | { |
| 1984 | builderState.style().accessSVGStyle().setFloodColor(forwardInheritedValue(builderState.parentStyle().svgStyle().floodColor())); |
| 1985 | } |
| 1986 | static void applyValueFloodColor(BuilderState& builderState, CSSValue& value) |
| 1987 | { |
| 1988 | builderState.style().accessSVGStyle().setFloodColor(BuilderConverter::convertSVGColor(builderState, value)); |
| 1989 | } |
| 1990 | static void applyInitialFloodOpacity(BuilderState& builderState) |
| 1991 | { |
| 1992 | builderState.style().accessSVGStyle().setFloodOpacity(SVGRenderStyle::initialFloodOpacity()); |
| 1993 | } |
| 1994 | static void applyInheritFloodOpacity(BuilderState& builderState) |
| 1995 | { |
| 1996 | builderState.style().accessSVGStyle().setFloodOpacity(forwardInheritedValue(builderState.parentStyle().svgStyle().floodOpacity())); |
| 1997 | } |
| 1998 | static void applyValueFloodOpacity(BuilderState& builderState, CSSValue& value) |
| 1999 | { |
| 2000 | builderState.style().accessSVGStyle().setFloodOpacity(BuilderConverter::convertOpacity(builderState, value)); |
| 2001 | } |
| 2002 | static void applyInitialGlyphOrientationHorizontal(BuilderState& builderState) |
| 2003 | { |
| 2004 | builderState.style().accessSVGStyle().setGlyphOrientationHorizontal(SVGRenderStyle::initialGlyphOrientationHorizontal()); |
| 2005 | } |
| 2006 | static void applyInheritGlyphOrientationHorizontal(BuilderState& builderState) |
| 2007 | { |
| 2008 | builderState.style().accessSVGStyle().setGlyphOrientationHorizontal(forwardInheritedValue(builderState.parentStyle().svgStyle().glyphOrientationHorizontal())); |
| 2009 | } |
| 2010 | static void applyValueGlyphOrientationHorizontal(BuilderState& builderState, CSSValue& value) |
| 2011 | { |
| 2012 | builderState.style().accessSVGStyle().setGlyphOrientationHorizontal(BuilderConverter::convertGlyphOrientation(builderState, value)); |
| 2013 | } |
| 2014 | static void applyInitialGlyphOrientationVertical(BuilderState& builderState) |
| 2015 | { |
| 2016 | builderState.style().accessSVGStyle().setGlyphOrientationVertical(SVGRenderStyle::initialGlyphOrientationVertical()); |
| 2017 | } |
| 2018 | static void applyInheritGlyphOrientationVertical(BuilderState& builderState) |
| 2019 | { |
| 2020 | builderState.style().accessSVGStyle().setGlyphOrientationVertical(forwardInheritedValue(builderState.parentStyle().svgStyle().glyphOrientationVertical())); |
| 2021 | } |
| 2022 | static void applyValueGlyphOrientationVertical(BuilderState& builderState, CSSValue& value) |
| 2023 | { |
| 2024 | builderState.style().accessSVGStyle().setGlyphOrientationVertical(BuilderConverter::convertGlyphOrientationOrAuto(builderState, value)); |
| 2025 | } |
| 2026 | static void applyInitialGridAutoColumns(BuilderState& builderState) |
| 2027 | { |
| 2028 | builderState.style().setGridAutoColumns(RenderStyle::initialGridAutoColumns()); |
| 2029 | } |
| 2030 | static void applyInheritGridAutoColumns(BuilderState& builderState) |
| 2031 | { |
| 2032 | builderState.style().setGridAutoColumns(forwardInheritedValue(builderState.parentStyle().gridAutoColumns())); |
| 2033 | } |
| 2034 | static void applyValueGridAutoColumns(BuilderState& builderState, CSSValue& value) |
| 2035 | { |
| 2036 | builderState.style().setGridAutoColumns(BuilderConverter::convertGridTrackSizeList(builderState, value)); |
| 2037 | } |
| 2038 | static void applyInitialGridAutoFlow(BuilderState& builderState) |
| 2039 | { |
| 2040 | builderState.style().setGridAutoFlow(RenderStyle::initialGridAutoFlow()); |
| 2041 | } |
| 2042 | static void applyInheritGridAutoFlow(BuilderState& builderState) |
| 2043 | { |
| 2044 | builderState.style().setGridAutoFlow(forwardInheritedValue(builderState.parentStyle().gridAutoFlow())); |
| 2045 | } |
| 2046 | static void applyValueGridAutoFlow(BuilderState& builderState, CSSValue& value) |
| 2047 | { |
| 2048 | builderState.style().setGridAutoFlow(BuilderConverter::convertGridAutoFlow(builderState, value)); |
| 2049 | } |
| 2050 | static void applyInitialGridAutoRows(BuilderState& builderState) |
| 2051 | { |
| 2052 | builderState.style().setGridAutoRows(RenderStyle::initialGridAutoRows()); |
| 2053 | } |
| 2054 | static void applyInheritGridAutoRows(BuilderState& builderState) |
| 2055 | { |
| 2056 | builderState.style().setGridAutoRows(forwardInheritedValue(builderState.parentStyle().gridAutoRows())); |
| 2057 | } |
| 2058 | static void applyValueGridAutoRows(BuilderState& builderState, CSSValue& value) |
| 2059 | { |
| 2060 | builderState.style().setGridAutoRows(BuilderConverter::convertGridTrackSizeList(builderState, value)); |
| 2061 | } |
| 2062 | static void applyInitialGridColumnEnd(BuilderState& builderState) |
| 2063 | { |
| 2064 | builderState.style().setGridItemColumnEnd(RenderStyle::initialGridItemColumnEnd()); |
| 2065 | } |
| 2066 | static void applyInheritGridColumnEnd(BuilderState& builderState) |
| 2067 | { |
| 2068 | builderState.style().setGridItemColumnEnd(forwardInheritedValue(builderState.parentStyle().gridItemColumnEnd())); |
| 2069 | } |
| 2070 | static void applyValueGridColumnEnd(BuilderState& builderState, CSSValue& value) |
| 2071 | { |
| 2072 | auto convertedValue = BuilderConverter::convertGridPosition(builderState, value); |
| 2073 | if (convertedValue) |
| 2074 | builderState.style().setGridItemColumnEnd(WTFMove(convertedValue.value())); |
| 2075 | } |
| 2076 | static void applyInitialGridColumnStart(BuilderState& builderState) |
| 2077 | { |
| 2078 | builderState.style().setGridItemColumnStart(RenderStyle::initialGridItemColumnStart()); |
| 2079 | } |
| 2080 | static void applyInheritGridColumnStart(BuilderState& builderState) |
| 2081 | { |
| 2082 | builderState.style().setGridItemColumnStart(forwardInheritedValue(builderState.parentStyle().gridItemColumnStart())); |
| 2083 | } |
| 2084 | static void applyValueGridColumnStart(BuilderState& builderState, CSSValue& value) |
| 2085 | { |
| 2086 | auto convertedValue = BuilderConverter::convertGridPosition(builderState, value); |
| 2087 | if (convertedValue) |
| 2088 | builderState.style().setGridItemColumnStart(WTFMove(convertedValue.value())); |
| 2089 | } |
| 2090 | static void applyInitialGridRowEnd(BuilderState& builderState) |
| 2091 | { |
| 2092 | builderState.style().setGridItemRowEnd(RenderStyle::initialGridItemRowEnd()); |
| 2093 | } |
| 2094 | static void applyInheritGridRowEnd(BuilderState& builderState) |
| 2095 | { |
| 2096 | builderState.style().setGridItemRowEnd(forwardInheritedValue(builderState.parentStyle().gridItemRowEnd())); |
| 2097 | } |
| 2098 | static void applyValueGridRowEnd(BuilderState& builderState, CSSValue& value) |
| 2099 | { |
| 2100 | auto convertedValue = BuilderConverter::convertGridPosition(builderState, value); |
| 2101 | if (convertedValue) |
| 2102 | builderState.style().setGridItemRowEnd(WTFMove(convertedValue.value())); |
| 2103 | } |
| 2104 | static void applyInitialGridRowStart(BuilderState& builderState) |
| 2105 | { |
| 2106 | builderState.style().setGridItemRowStart(RenderStyle::initialGridItemRowStart()); |
| 2107 | } |
| 2108 | static void applyInheritGridRowStart(BuilderState& builderState) |
| 2109 | { |
| 2110 | builderState.style().setGridItemRowStart(forwardInheritedValue(builderState.parentStyle().gridItemRowStart())); |
| 2111 | } |
| 2112 | static void applyValueGridRowStart(BuilderState& builderState, CSSValue& value) |
| 2113 | { |
| 2114 | auto convertedValue = BuilderConverter::convertGridPosition(builderState, value); |
| 2115 | if (convertedValue) |
| 2116 | builderState.style().setGridItemRowStart(WTFMove(convertedValue.value())); |
| 2117 | } |
| 2118 | static void applyInitialHangingPunctuation(BuilderState& builderState) |
| 2119 | { |
| 2120 | builderState.style().setHangingPunctuation(RenderStyle::initialHangingPunctuation()); |
| 2121 | } |
| 2122 | static void applyInheritHangingPunctuation(BuilderState& builderState) |
| 2123 | { |
| 2124 | builderState.style().setHangingPunctuation(forwardInheritedValue(builderState.parentStyle().hangingPunctuation())); |
| 2125 | } |
| 2126 | static void applyValueHangingPunctuation(BuilderState& builderState, CSSValue& value) |
| 2127 | { |
| 2128 | builderState.style().setHangingPunctuation(BuilderConverter::convertHangingPunctuation(builderState, value)); |
| 2129 | } |
| 2130 | static void applyInitialHeight(BuilderState& builderState) |
| 2131 | { |
| 2132 | builderState.style().setHeight(RenderStyle::initialSize()); |
| 2133 | } |
| 2134 | static void applyInheritHeight(BuilderState& builderState) |
| 2135 | { |
| 2136 | builderState.style().setHeight(forwardInheritedValue(builderState.parentStyle().height())); |
| 2137 | } |
| 2138 | static void applyValueHeight(BuilderState& builderState, CSSValue& value) |
| 2139 | { |
| 2140 | builderState.style().setHeight(BuilderConverter::convertLengthSizing(builderState, value)); |
| 2141 | } |
| 2142 | static void applyInitialImageOrientation(BuilderState& builderState) |
| 2143 | { |
| 2144 | builderState.style().setImageOrientation(RenderStyle::initialImageOrientation()); |
| 2145 | } |
| 2146 | static void applyInheritImageOrientation(BuilderState& builderState) |
| 2147 | { |
| 2148 | builderState.style().setImageOrientation(forwardInheritedValue(builderState.parentStyle().imageOrientation())); |
| 2149 | } |
| 2150 | static void applyValueImageOrientation(BuilderState& builderState, CSSValue& value) |
| 2151 | { |
| 2152 | builderState.style().setImageOrientation(BuilderConverter::convertImageOrientation(builderState, value)); |
| 2153 | } |
| 2154 | static void applyInitialImageRendering(BuilderState& builderState) |
| 2155 | { |
| 2156 | builderState.style().setImageRendering(RenderStyle::initialImageRendering()); |
| 2157 | } |
| 2158 | static void applyInheritImageRendering(BuilderState& builderState) |
| 2159 | { |
| 2160 | builderState.style().setImageRendering(forwardInheritedValue(builderState.parentStyle().imageRendering())); |
| 2161 | } |
| 2162 | static void applyValueImageRendering(BuilderState& builderState, CSSValue& value) |
| 2163 | { |
| 2164 | builderState.style().setImageRendering(downcast<CSSPrimitiveValue>(value)); |
| 2165 | } |
| 2166 | static void applyInitialIsolation(BuilderState& builderState) |
| 2167 | { |
| 2168 | builderState.style().setIsolation(RenderStyle::initialIsolation()); |
| 2169 | } |
| 2170 | static void applyInheritIsolation(BuilderState& builderState) |
| 2171 | { |
| 2172 | builderState.style().setIsolation(forwardInheritedValue(builderState.parentStyle().isolation())); |
| 2173 | } |
| 2174 | static void applyValueIsolation(BuilderState& builderState, CSSValue& value) |
| 2175 | { |
| 2176 | builderState.style().setIsolation(downcast<CSSPrimitiveValue>(value)); |
| 2177 | } |
| 2178 | static void applyInitialJustifyContent(BuilderState& builderState) |
| 2179 | { |
| 2180 | builderState.style().setJustifyContent(RenderStyle::initialContentAlignment()); |
| 2181 | } |
| 2182 | static void applyInheritJustifyContent(BuilderState& builderState) |
| 2183 | { |
| 2184 | builderState.style().setJustifyContent(forwardInheritedValue(builderState.parentStyle().justifyContent())); |
| 2185 | } |
| 2186 | static void applyValueJustifyContent(BuilderState& builderState, CSSValue& value) |
| 2187 | { |
| 2188 | builderState.style().setJustifyContent(BuilderConverter::convertContentAlignmentData(builderState, value)); |
| 2189 | } |
| 2190 | static void applyInitialJustifyItems(BuilderState& builderState) |
| 2191 | { |
| 2192 | builderState.style().setJustifyItems(RenderStyle::initialJustifyItems()); |
| 2193 | } |
| 2194 | static void applyInheritJustifyItems(BuilderState& builderState) |
| 2195 | { |
| 2196 | builderState.style().setJustifyItems(forwardInheritedValue(builderState.parentStyle().justifyItems())); |
| 2197 | } |
| 2198 | static void applyValueJustifyItems(BuilderState& builderState, CSSValue& value) |
| 2199 | { |
| 2200 | builderState.style().setJustifyItems(BuilderConverter::convertSelfOrDefaultAlignmentData(builderState, value)); |
| 2201 | } |
| 2202 | static void applyInitialJustifySelf(BuilderState& builderState) |
| 2203 | { |
| 2204 | builderState.style().setJustifySelf(RenderStyle::initialSelfAlignment()); |
| 2205 | } |
| 2206 | static void applyInheritJustifySelf(BuilderState& builderState) |
| 2207 | { |
| 2208 | builderState.style().setJustifySelf(forwardInheritedValue(builderState.parentStyle().justifySelf())); |
| 2209 | } |
| 2210 | static void applyValueJustifySelf(BuilderState& builderState, CSSValue& value) |
| 2211 | { |
| 2212 | builderState.style().setJustifySelf(BuilderConverter::convertSelfOrDefaultAlignmentData(builderState, value)); |
| 2213 | } |
| 2214 | static void applyInitialKerning(BuilderState& builderState) |
| 2215 | { |
| 2216 | builderState.style().accessSVGStyle().setKerning(SVGRenderStyle::initialKerning()); |
| 2217 | } |
| 2218 | static void applyInheritKerning(BuilderState& builderState) |
| 2219 | { |
| 2220 | builderState.style().accessSVGStyle().setKerning(forwardInheritedValue(builderState.parentStyle().svgStyle().kerning())); |
| 2221 | } |
| 2222 | static void applyValueKerning(BuilderState& builderState, CSSValue& value) |
| 2223 | { |
| 2224 | builderState.style().accessSVGStyle().setKerning(BuilderConverter::convertSVGLengthValue(builderState, value)); |
| 2225 | } |
| 2226 | static void applyInitialLeft(BuilderState& builderState) |
| 2227 | { |
| 2228 | builderState.style().setLeft(RenderStyle::initialOffset()); |
| 2229 | } |
| 2230 | static void applyInheritLeft(BuilderState& builderState) |
| 2231 | { |
| 2232 | builderState.style().setLeft(forwardInheritedValue(builderState.parentStyle().left())); |
| 2233 | } |
| 2234 | static void applyValueLeft(BuilderState& builderState, CSSValue& value) |
| 2235 | { |
| 2236 | builderState.style().setLeft(BuilderConverter::convertLengthOrAuto(builderState, value)); |
| 2237 | } |
| 2238 | static void applyInitialLightingColor(BuilderState& builderState) |
| 2239 | { |
| 2240 | builderState.style().accessSVGStyle().setLightingColor(SVGRenderStyle::initialLightingColor()); |
| 2241 | } |
| 2242 | static void applyInheritLightingColor(BuilderState& builderState) |
| 2243 | { |
| 2244 | builderState.style().accessSVGStyle().setLightingColor(forwardInheritedValue(builderState.parentStyle().svgStyle().lightingColor())); |
| 2245 | } |
| 2246 | static void applyValueLightingColor(BuilderState& builderState, CSSValue& value) |
| 2247 | { |
| 2248 | builderState.style().accessSVGStyle().setLightingColor(BuilderConverter::convertSVGColor(builderState, value)); |
| 2249 | } |
| 2250 | static void applyInitialLineBreak(BuilderState& builderState) |
| 2251 | { |
| 2252 | builderState.style().setLineBreak(RenderStyle::initialLineBreak()); |
| 2253 | } |
| 2254 | static void applyInheritLineBreak(BuilderState& builderState) |
| 2255 | { |
| 2256 | builderState.style().setLineBreak(forwardInheritedValue(builderState.parentStyle().lineBreak())); |
| 2257 | } |
| 2258 | static void applyValueLineBreak(BuilderState& builderState, CSSValue& value) |
| 2259 | { |
| 2260 | builderState.style().setLineBreak(downcast<CSSPrimitiveValue>(value)); |
| 2261 | } |
| 2262 | static void applyInitialListStyleImage(BuilderState& builderState) |
| 2263 | { |
| 2264 | builderState.style().setListStyleImage(RenderStyle::initialListStyleImage()); |
| 2265 | } |
| 2266 | static void applyInheritListStyleImage(BuilderState& builderState) |
| 2267 | { |
| 2268 | builderState.style().setListStyleImage(forwardInheritedValue(builderState.parentStyle().listStyleImage())); |
| 2269 | } |
| 2270 | static void applyValueListStyleImage(BuilderState& builderState, CSSValue& value) |
| 2271 | { |
| 2272 | builderState.style().setListStyleImage(BuilderConverter::convertStyleImage<CSSPropertyListStyleImage>(builderState, value)); |
| 2273 | } |
| 2274 | static void applyInitialListStylePosition(BuilderState& builderState) |
| 2275 | { |
| 2276 | builderState.style().setListStylePosition(RenderStyle::initialListStylePosition()); |
| 2277 | } |
| 2278 | static void applyInheritListStylePosition(BuilderState& builderState) |
| 2279 | { |
| 2280 | builderState.style().setListStylePosition(forwardInheritedValue(builderState.parentStyle().listStylePosition())); |
| 2281 | } |
| 2282 | static void applyValueListStylePosition(BuilderState& builderState, CSSValue& value) |
| 2283 | { |
| 2284 | builderState.style().setListStylePosition(downcast<CSSPrimitiveValue>(value)); |
| 2285 | } |
| 2286 | static void applyInitialMarginBottom(BuilderState& builderState) |
| 2287 | { |
| 2288 | builderState.style().setMarginBottom(RenderStyle::initialMargin()); |
| 2289 | } |
| 2290 | static void applyInheritMarginBottom(BuilderState& builderState) |
| 2291 | { |
| 2292 | builderState.style().setMarginBottom(forwardInheritedValue(builderState.parentStyle().marginBottom())); |
| 2293 | } |
| 2294 | static void applyValueMarginBottom(BuilderState& builderState, CSSValue& value) |
| 2295 | { |
| 2296 | builderState.style().setMarginBottom(BuilderConverter::convertLengthOrAuto(builderState, value)); |
| 2297 | } |
| 2298 | static void applyInitialMarginLeft(BuilderState& builderState) |
| 2299 | { |
| 2300 | builderState.style().setMarginLeft(RenderStyle::initialMargin()); |
| 2301 | } |
| 2302 | static void applyInheritMarginLeft(BuilderState& builderState) |
| 2303 | { |
| 2304 | builderState.style().setMarginLeft(forwardInheritedValue(builderState.parentStyle().marginLeft())); |
| 2305 | } |
| 2306 | static void applyValueMarginLeft(BuilderState& builderState, CSSValue& value) |
| 2307 | { |
| 2308 | builderState.style().setMarginLeft(BuilderConverter::convertLengthOrAuto(builderState, value)); |
| 2309 | } |
| 2310 | static void applyInitialMarginRight(BuilderState& builderState) |
| 2311 | { |
| 2312 | builderState.style().setMarginRight(RenderStyle::initialMargin()); |
| 2313 | } |
| 2314 | static void applyInheritMarginRight(BuilderState& builderState) |
| 2315 | { |
| 2316 | builderState.style().setMarginRight(forwardInheritedValue(builderState.parentStyle().marginRight())); |
| 2317 | } |
| 2318 | static void applyValueMarginRight(BuilderState& builderState, CSSValue& value) |
| 2319 | { |
| 2320 | builderState.style().setMarginRight(BuilderConverter::convertLengthOrAuto(builderState, value)); |
| 2321 | } |
| 2322 | static void applyInitialMarginTop(BuilderState& builderState) |
| 2323 | { |
| 2324 | builderState.style().setMarginTop(RenderStyle::initialMargin()); |
| 2325 | } |
| 2326 | static void applyInheritMarginTop(BuilderState& builderState) |
| 2327 | { |
| 2328 | builderState.style().setMarginTop(forwardInheritedValue(builderState.parentStyle().marginTop())); |
| 2329 | } |
| 2330 | static void applyValueMarginTop(BuilderState& builderState, CSSValue& value) |
| 2331 | { |
| 2332 | builderState.style().setMarginTop(BuilderConverter::convertLengthOrAuto(builderState, value)); |
| 2333 | } |
| 2334 | static void applyInitialMarkerEnd(BuilderState& builderState) |
| 2335 | { |
| 2336 | builderState.style().accessSVGStyle().setMarkerEndResource(SVGRenderStyle::initialMarkerEndResource()); |
| 2337 | } |
| 2338 | static void applyInheritMarkerEnd(BuilderState& builderState) |
| 2339 | { |
| 2340 | builderState.style().accessSVGStyle().setMarkerEndResource(forwardInheritedValue(builderState.parentStyle().svgStyle().markerEndResource())); |
| 2341 | } |
| 2342 | static void applyValueMarkerEnd(BuilderState& builderState, CSSValue& value) |
| 2343 | { |
| 2344 | builderState.style().accessSVGStyle().setMarkerEndResource(BuilderConverter::convertSVGURIReference(builderState, value)); |
| 2345 | } |
| 2346 | static void applyInitialMarkerMid(BuilderState& builderState) |
| 2347 | { |
| 2348 | builderState.style().accessSVGStyle().setMarkerMidResource(SVGRenderStyle::initialMarkerMidResource()); |
| 2349 | } |
| 2350 | static void applyInheritMarkerMid(BuilderState& builderState) |
| 2351 | { |
| 2352 | builderState.style().accessSVGStyle().setMarkerMidResource(forwardInheritedValue(builderState.parentStyle().svgStyle().markerMidResource())); |
| 2353 | } |
| 2354 | static void applyValueMarkerMid(BuilderState& builderState, CSSValue& value) |
| 2355 | { |
| 2356 | builderState.style().accessSVGStyle().setMarkerMidResource(BuilderConverter::convertSVGURIReference(builderState, value)); |
| 2357 | } |
| 2358 | static void applyInitialMarkerStart(BuilderState& builderState) |
| 2359 | { |
| 2360 | builderState.style().accessSVGStyle().setMarkerStartResource(SVGRenderStyle::initialMarkerStartResource()); |
| 2361 | } |
| 2362 | static void applyInheritMarkerStart(BuilderState& builderState) |
| 2363 | { |
| 2364 | builderState.style().accessSVGStyle().setMarkerStartResource(forwardInheritedValue(builderState.parentStyle().svgStyle().markerStartResource())); |
| 2365 | } |
| 2366 | static void applyValueMarkerStart(BuilderState& builderState, CSSValue& value) |
| 2367 | { |
| 2368 | builderState.style().accessSVGStyle().setMarkerStartResource(BuilderConverter::convertSVGURIReference(builderState, value)); |
| 2369 | } |
| 2370 | static void applyInitialMask(BuilderState& builderState) |
| 2371 | { |
| 2372 | builderState.style().accessSVGStyle().setMaskerResource(SVGRenderStyle::initialMaskerResource()); |
| 2373 | } |
| 2374 | static void applyInheritMask(BuilderState& builderState) |
| 2375 | { |
| 2376 | builderState.style().accessSVGStyle().setMaskerResource(forwardInheritedValue(builderState.parentStyle().svgStyle().maskerResource())); |
| 2377 | } |
| 2378 | static void applyValueMask(BuilderState& builderState, CSSValue& value) |
| 2379 | { |
| 2380 | builderState.style().accessSVGStyle().setMaskerResource(BuilderConverter::convertSVGURIReference(builderState, value)); |
| 2381 | } |
| 2382 | static void applyInitialMaskType(BuilderState& builderState) |
| 2383 | { |
| 2384 | builderState.style().accessSVGStyle().setMaskType(SVGRenderStyle::initialMaskType()); |
| 2385 | } |
| 2386 | static void applyInheritMaskType(BuilderState& builderState) |
| 2387 | { |
| 2388 | builderState.style().accessSVGStyle().setMaskType(forwardInheritedValue(builderState.parentStyle().svgStyle().maskType())); |
| 2389 | } |
| 2390 | static void applyValueMaskType(BuilderState& builderState, CSSValue& value) |
| 2391 | { |
| 2392 | builderState.style().accessSVGStyle().setMaskType(downcast<CSSPrimitiveValue>(value)); |
| 2393 | } |
| 2394 | static void applyInitialMathStyle(BuilderState& builderState) |
| 2395 | { |
| 2396 | builderState.style().setMathStyle(RenderStyle::initialMathStyle()); |
| 2397 | } |
| 2398 | static void applyInheritMathStyle(BuilderState& builderState) |
| 2399 | { |
| 2400 | builderState.style().setMathStyle(forwardInheritedValue(builderState.parentStyle().mathStyle())); |
| 2401 | } |
| 2402 | static void applyValueMathStyle(BuilderState& builderState, CSSValue& value) |
| 2403 | { |
| 2404 | builderState.style().setMathStyle(downcast<CSSPrimitiveValue>(value)); |
| 2405 | } |
| 2406 | static void applyInitialMaxHeight(BuilderState& builderState) |
| 2407 | { |
| 2408 | builderState.style().setMaxHeight(RenderStyle::initialMaxSize()); |
| 2409 | } |
| 2410 | static void applyInheritMaxHeight(BuilderState& builderState) |
| 2411 | { |
| 2412 | builderState.style().setMaxHeight(forwardInheritedValue(builderState.parentStyle().maxHeight())); |
| 2413 | } |
| 2414 | static void applyValueMaxHeight(BuilderState& builderState, CSSValue& value) |
| 2415 | { |
| 2416 | builderState.style().setMaxHeight(BuilderConverter::convertLengthMaxSizing(builderState, value)); |
| 2417 | } |
| 2418 | static void applyInitialMaxWidth(BuilderState& builderState) |
| 2419 | { |
| 2420 | builderState.style().setMaxWidth(RenderStyle::initialMaxSize()); |
| 2421 | } |
| 2422 | static void applyInheritMaxWidth(BuilderState& builderState) |
| 2423 | { |
| 2424 | builderState.style().setMaxWidth(forwardInheritedValue(builderState.parentStyle().maxWidth())); |
| 2425 | } |
| 2426 | static void applyValueMaxWidth(BuilderState& builderState, CSSValue& value) |
| 2427 | { |
| 2428 | builderState.style().setMaxWidth(BuilderConverter::convertLengthMaxSizing(builderState, value)); |
| 2429 | } |
| 2430 | static void applyInitialMinHeight(BuilderState& builderState) |
| 2431 | { |
| 2432 | builderState.style().setMinHeight(RenderStyle::initialMinSize()); |
| 2433 | } |
| 2434 | static void applyInheritMinHeight(BuilderState& builderState) |
| 2435 | { |
| 2436 | builderState.style().setMinHeight(forwardInheritedValue(builderState.parentStyle().minHeight())); |
| 2437 | } |
| 2438 | static void applyValueMinHeight(BuilderState& builderState, CSSValue& value) |
| 2439 | { |
| 2440 | builderState.style().setMinHeight(BuilderConverter::convertLengthSizing(builderState, value)); |
| 2441 | } |
| 2442 | static void applyInitialMinWidth(BuilderState& builderState) |
| 2443 | { |
| 2444 | builderState.style().setMinWidth(RenderStyle::initialMinSize()); |
| 2445 | } |
| 2446 | static void applyInheritMinWidth(BuilderState& builderState) |
| 2447 | { |
| 2448 | builderState.style().setMinWidth(forwardInheritedValue(builderState.parentStyle().minWidth())); |
| 2449 | } |
| 2450 | static void applyValueMinWidth(BuilderState& builderState, CSSValue& value) |
| 2451 | { |
| 2452 | builderState.style().setMinWidth(BuilderConverter::convertLengthSizing(builderState, value)); |
| 2453 | } |
| 2454 | static void applyInitialMixBlendMode(BuilderState& builderState) |
| 2455 | { |
| 2456 | builderState.style().setBlendMode(RenderStyle::initialBlendMode()); |
| 2457 | } |
| 2458 | static void applyInheritMixBlendMode(BuilderState& builderState) |
| 2459 | { |
| 2460 | builderState.style().setBlendMode(forwardInheritedValue(builderState.parentStyle().blendMode())); |
| 2461 | } |
| 2462 | static void applyValueMixBlendMode(BuilderState& builderState, CSSValue& value) |
| 2463 | { |
| 2464 | builderState.style().setBlendMode(downcast<CSSPrimitiveValue>(value)); |
| 2465 | } |
| 2466 | static void applyInitialObjectFit(BuilderState& builderState) |
| 2467 | { |
| 2468 | builderState.style().setObjectFit(RenderStyle::initialObjectFit()); |
| 2469 | } |
| 2470 | static void applyInheritObjectFit(BuilderState& builderState) |
| 2471 | { |
| 2472 | builderState.style().setObjectFit(forwardInheritedValue(builderState.parentStyle().objectFit())); |
| 2473 | } |
| 2474 | static void applyValueObjectFit(BuilderState& builderState, CSSValue& value) |
| 2475 | { |
| 2476 | builderState.style().setObjectFit(downcast<CSSPrimitiveValue>(value)); |
| 2477 | } |
| 2478 | static void applyInitialObjectPosition(BuilderState& builderState) |
| 2479 | { |
| 2480 | builderState.style().setObjectPosition(RenderStyle::initialObjectPosition()); |
| 2481 | } |
| 2482 | static void applyInheritObjectPosition(BuilderState& builderState) |
| 2483 | { |
| 2484 | builderState.style().setObjectPosition(forwardInheritedValue(builderState.parentStyle().objectPosition())); |
| 2485 | } |
| 2486 | static void applyValueObjectPosition(BuilderState& builderState, CSSValue& value) |
| 2487 | { |
| 2488 | builderState.style().setObjectPosition(BuilderConverter::convertObjectPosition(builderState, value)); |
| 2489 | } |
| 2490 | static void applyInitialOpacity(BuilderState& builderState) |
| 2491 | { |
| 2492 | builderState.style().setOpacity(RenderStyle::initialOpacity()); |
| 2493 | } |
| 2494 | static void applyInheritOpacity(BuilderState& builderState) |
| 2495 | { |
| 2496 | builderState.style().setOpacity(forwardInheritedValue(builderState.parentStyle().opacity())); |
| 2497 | } |
| 2498 | static void applyValueOpacity(BuilderState& builderState, CSSValue& value) |
| 2499 | { |
| 2500 | builderState.style().setOpacity(BuilderConverter::convertOpacity(builderState, value)); |
| 2501 | } |
| 2502 | static void applyInitialOrder(BuilderState& builderState) |
| 2503 | { |
| 2504 | builderState.style().setOrder(RenderStyle::initialOrder()); |
| 2505 | } |
| 2506 | static void applyInheritOrder(BuilderState& builderState) |
| 2507 | { |
| 2508 | builderState.style().setOrder(forwardInheritedValue(builderState.parentStyle().order())); |
| 2509 | } |
| 2510 | static void applyValueOrder(BuilderState& builderState, CSSValue& value) |
| 2511 | { |
| 2512 | builderState.style().setOrder(downcast<CSSPrimitiveValue>(value)); |
| 2513 | } |
| 2514 | static void applyInitialOrphans(BuilderState& builderState) |
| 2515 | { |
| 2516 | builderState.style().setHasAutoOrphans(); |
| 2517 | } |
| 2518 | static void applyInheritOrphans(BuilderState& builderState) |
| 2519 | { |
| 2520 | if (builderState.parentStyle().hasAutoOrphans()) { |
| 2521 | builderState.style().setHasAutoOrphans(); |
| 2522 | return; |
| 2523 | } |
| 2524 | builderState.style().setOrphans(forwardInheritedValue(builderState.parentStyle().orphans())); |
| 2525 | } |
| 2526 | static void applyValueOrphans(BuilderState& builderState, CSSValue& value) |
| 2527 | { |
| 2528 | if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto) { |
| 2529 | builderState.style().setHasAutoOrphans(); |
| 2530 | return; |
| 2531 | } |
| 2532 | builderState.style().setOrphans(downcast<CSSPrimitiveValue>(value)); |
| 2533 | } |
| 2534 | static void applyInitialOutlineColor(BuilderState& builderState) |
| 2535 | { |
| 2536 | if (builderState.applyPropertyToRegularStyle()) |
| 2537 | builderState.style().setOutlineColor(RenderStyle::currentColor()); |
| 2538 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 2539 | builderState.style().setVisitedLinkOutlineColor(RenderStyle::currentColor()); |
| 2540 | } |
| 2541 | static void applyInheritOutlineColor(BuilderState& builderState) |
| 2542 | { |
| 2543 | Color color = builderState.parentStyle().outlineColor(); |
| 2544 | if (builderState.applyPropertyToRegularStyle()) |
| 2545 | builderState.style().setOutlineColor(color); |
| 2546 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 2547 | builderState.style().setVisitedLinkOutlineColor(color); |
| 2548 | } |
| 2549 | static void applyValueOutlineColor(BuilderState& builderState, CSSValue& value) |
| 2550 | { |
| 2551 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
| 2552 | if (builderState.applyPropertyToRegularStyle()) |
| 2553 | builderState.style().setOutlineColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
| 2554 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 2555 | builderState.style().setVisitedLinkOutlineColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
| 2556 | } |
| 2557 | static void applyInitialOutlineOffset(BuilderState& builderState) |
| 2558 | { |
| 2559 | builderState.style().setOutlineOffset(RenderStyle::initialOutlineOffset()); |
| 2560 | } |
| 2561 | static void applyInheritOutlineOffset(BuilderState& builderState) |
| 2562 | { |
| 2563 | builderState.style().setOutlineOffset(forwardInheritedValue(builderState.parentStyle().outlineOffset())); |
| 2564 | } |
| 2565 | static void applyValueOutlineOffset(BuilderState& builderState, CSSValue& value) |
| 2566 | { |
| 2567 | builderState.style().setOutlineOffset(BuilderConverter::convertComputedLength<float>(builderState, value)); |
| 2568 | } |
| 2569 | static void applyInitialOutlineWidth(BuilderState& builderState) |
| 2570 | { |
| 2571 | builderState.style().setOutlineWidth(RenderStyle::initialOutlineWidth()); |
| 2572 | } |
| 2573 | static void applyInheritOutlineWidth(BuilderState& builderState) |
| 2574 | { |
| 2575 | builderState.style().setOutlineWidth(forwardInheritedValue(builderState.parentStyle().outlineWidth())); |
| 2576 | } |
| 2577 | static void applyValueOutlineWidth(BuilderState& builderState, CSSValue& value) |
| 2578 | { |
| 2579 | builderState.style().setOutlineWidth(BuilderConverter::convertLineWidth<float>(builderState, value)); |
| 2580 | } |
| 2581 | static void applyInitialOverflowWrap(BuilderState& builderState) |
| 2582 | { |
| 2583 | builderState.style().setOverflowWrap(RenderStyle::initialOverflowWrap()); |
| 2584 | } |
| 2585 | static void applyInheritOverflowWrap(BuilderState& builderState) |
| 2586 | { |
| 2587 | builderState.style().setOverflowWrap(forwardInheritedValue(builderState.parentStyle().overflowWrap())); |
| 2588 | } |
| 2589 | static void applyValueOverflowWrap(BuilderState& builderState, CSSValue& value) |
| 2590 | { |
| 2591 | builderState.style().setOverflowWrap(downcast<CSSPrimitiveValue>(value)); |
| 2592 | } |
| 2593 | static void applyInitialOverflowX(BuilderState& builderState) |
| 2594 | { |
| 2595 | builderState.style().setOverflowX(RenderStyle::initialOverflowX()); |
| 2596 | } |
| 2597 | static void applyInheritOverflowX(BuilderState& builderState) |
| 2598 | { |
| 2599 | builderState.style().setOverflowX(forwardInheritedValue(builderState.parentStyle().overflowX())); |
| 2600 | } |
| 2601 | static void applyValueOverflowX(BuilderState& builderState, CSSValue& value) |
| 2602 | { |
| 2603 | builderState.style().setOverflowX(downcast<CSSPrimitiveValue>(value)); |
| 2604 | } |
| 2605 | static void applyInitialOverflowY(BuilderState& builderState) |
| 2606 | { |
| 2607 | builderState.style().setOverflowY(RenderStyle::initialOverflowY()); |
| 2608 | } |
| 2609 | static void applyInheritOverflowY(BuilderState& builderState) |
| 2610 | { |
| 2611 | builderState.style().setOverflowY(forwardInheritedValue(builderState.parentStyle().overflowY())); |
| 2612 | } |
| 2613 | static void applyValueOverflowY(BuilderState& builderState, CSSValue& value) |
| 2614 | { |
| 2615 | builderState.style().setOverflowY(downcast<CSSPrimitiveValue>(value)); |
| 2616 | } |
| 2617 | static void applyInitialOverscrollBehaviorX(BuilderState& builderState) |
| 2618 | { |
| 2619 | builderState.style().setOverscrollBehaviorX(RenderStyle::initialOverscrollBehaviorX()); |
| 2620 | } |
| 2621 | static void applyInheritOverscrollBehaviorX(BuilderState& builderState) |
| 2622 | { |
| 2623 | builderState.style().setOverscrollBehaviorX(forwardInheritedValue(builderState.parentStyle().overscrollBehaviorX())); |
| 2624 | } |
| 2625 | static void applyValueOverscrollBehaviorX(BuilderState& builderState, CSSValue& value) |
| 2626 | { |
| 2627 | builderState.style().setOverscrollBehaviorX(downcast<CSSPrimitiveValue>(value)); |
| 2628 | } |
| 2629 | static void applyInitialOverscrollBehaviorY(BuilderState& builderState) |
| 2630 | { |
| 2631 | builderState.style().setOverscrollBehaviorY(RenderStyle::initialOverscrollBehaviorY()); |
| 2632 | } |
| 2633 | static void applyInheritOverscrollBehaviorY(BuilderState& builderState) |
| 2634 | { |
| 2635 | builderState.style().setOverscrollBehaviorY(forwardInheritedValue(builderState.parentStyle().overscrollBehaviorY())); |
| 2636 | } |
| 2637 | static void applyValueOverscrollBehaviorY(BuilderState& builderState, CSSValue& value) |
| 2638 | { |
| 2639 | builderState.style().setOverscrollBehaviorY(downcast<CSSPrimitiveValue>(value)); |
| 2640 | } |
| 2641 | static void applyInitialPaddingBottom(BuilderState& builderState) |
| 2642 | { |
| 2643 | builderState.style().setPaddingBottom(RenderStyle::initialPadding()); |
| 2644 | } |
| 2645 | static void applyInheritPaddingBottom(BuilderState& builderState) |
| 2646 | { |
| 2647 | builderState.style().setPaddingBottom(forwardInheritedValue(builderState.parentStyle().paddingBottom())); |
| 2648 | } |
| 2649 | static void applyValuePaddingBottom(BuilderState& builderState, CSSValue& value) |
| 2650 | { |
| 2651 | builderState.style().setPaddingBottom(BuilderConverter::convertLength(builderState, value)); |
| 2652 | } |
| 2653 | static void applyInitialPaddingLeft(BuilderState& builderState) |
| 2654 | { |
| 2655 | builderState.style().setPaddingLeft(RenderStyle::initialPadding()); |
| 2656 | } |
| 2657 | static void applyInheritPaddingLeft(BuilderState& builderState) |
| 2658 | { |
| 2659 | builderState.style().setPaddingLeft(forwardInheritedValue(builderState.parentStyle().paddingLeft())); |
| 2660 | } |
| 2661 | static void applyValuePaddingLeft(BuilderState& builderState, CSSValue& value) |
| 2662 | { |
| 2663 | builderState.style().setPaddingLeft(BuilderConverter::convertLength(builderState, value)); |
| 2664 | } |
| 2665 | static void applyInitialPaddingRight(BuilderState& builderState) |
| 2666 | { |
| 2667 | builderState.style().setPaddingRight(RenderStyle::initialPadding()); |
| 2668 | } |
| 2669 | static void applyInheritPaddingRight(BuilderState& builderState) |
| 2670 | { |
| 2671 | builderState.style().setPaddingRight(forwardInheritedValue(builderState.parentStyle().paddingRight())); |
| 2672 | } |
| 2673 | static void applyValuePaddingRight(BuilderState& builderState, CSSValue& value) |
| 2674 | { |
| 2675 | builderState.style().setPaddingRight(BuilderConverter::convertLength(builderState, value)); |
| 2676 | } |
| 2677 | static void applyInitialPaddingTop(BuilderState& builderState) |
| 2678 | { |
| 2679 | builderState.style().setPaddingTop(RenderStyle::initialPadding()); |
| 2680 | } |
| 2681 | static void applyInheritPaddingTop(BuilderState& builderState) |
| 2682 | { |
| 2683 | builderState.style().setPaddingTop(forwardInheritedValue(builderState.parentStyle().paddingTop())); |
| 2684 | } |
| 2685 | static void applyValuePaddingTop(BuilderState& builderState, CSSValue& value) |
| 2686 | { |
| 2687 | builderState.style().setPaddingTop(BuilderConverter::convertLength(builderState, value)); |
| 2688 | } |
| 2689 | static void applyInitialPaintOrder(BuilderState& builderState) |
| 2690 | { |
| 2691 | builderState.style().setPaintOrder(RenderStyle::initialPaintOrder()); |
| 2692 | } |
| 2693 | static void applyInheritPaintOrder(BuilderState& builderState) |
| 2694 | { |
| 2695 | builderState.style().setPaintOrder(forwardInheritedValue(builderState.parentStyle().paintOrder())); |
| 2696 | } |
| 2697 | static void applyValuePaintOrder(BuilderState& builderState, CSSValue& value) |
| 2698 | { |
| 2699 | builderState.style().setPaintOrder(BuilderConverter::convertPaintOrder(builderState, value)); |
| 2700 | } |
| 2701 | static void applyInitialPerspective(BuilderState& builderState) |
| 2702 | { |
| 2703 | builderState.style().setPerspective(RenderStyle::initialPerspective()); |
| 2704 | } |
| 2705 | static void applyInheritPerspective(BuilderState& builderState) |
| 2706 | { |
| 2707 | builderState.style().setPerspective(forwardInheritedValue(builderState.parentStyle().perspective())); |
| 2708 | } |
| 2709 | static void applyValuePerspective(BuilderState& builderState, CSSValue& value) |
| 2710 | { |
| 2711 | auto convertedValue = BuilderConverter::convertPerspective(builderState, value); |
| 2712 | if (convertedValue) |
| 2713 | builderState.style().setPerspective(WTFMove(convertedValue.value())); |
| 2714 | } |
| 2715 | static void applyInitialPerspectiveOriginX(BuilderState& builderState) |
| 2716 | { |
| 2717 | builderState.style().setPerspectiveOriginX(RenderStyle::initialPerspectiveOriginX()); |
| 2718 | } |
| 2719 | static void applyInheritPerspectiveOriginX(BuilderState& builderState) |
| 2720 | { |
| 2721 | builderState.style().setPerspectiveOriginX(forwardInheritedValue(builderState.parentStyle().perspectiveOriginX())); |
| 2722 | } |
| 2723 | static void applyValuePerspectiveOriginX(BuilderState& builderState, CSSValue& value) |
| 2724 | { |
| 2725 | builderState.style().setPerspectiveOriginX(BuilderConverter::convertPositionComponentX(builderState, value)); |
| 2726 | } |
| 2727 | static void applyInitialPerspectiveOriginY(BuilderState& builderState) |
| 2728 | { |
| 2729 | builderState.style().setPerspectiveOriginY(RenderStyle::initialPerspectiveOriginY()); |
| 2730 | } |
| 2731 | static void applyInheritPerspectiveOriginY(BuilderState& builderState) |
| 2732 | { |
| 2733 | builderState.style().setPerspectiveOriginY(forwardInheritedValue(builderState.parentStyle().perspectiveOriginY())); |
| 2734 | } |
| 2735 | static void applyValuePerspectiveOriginY(BuilderState& builderState, CSSValue& value) |
| 2736 | { |
| 2737 | builderState.style().setPerspectiveOriginY(BuilderConverter::convertPositionComponentY(builderState, value)); |
| 2738 | } |
| 2739 | static void applyInitialPointerEvents(BuilderState& builderState) |
| 2740 | { |
| 2741 | builderState.style().setPointerEvents(RenderStyle::initialPointerEvents()); |
| 2742 | } |
| 2743 | static void applyInheritPointerEvents(BuilderState& builderState) |
| 2744 | { |
| 2745 | builderState.style().setPointerEvents(forwardInheritedValue(builderState.parentStyle().pointerEvents())); |
| 2746 | } |
| 2747 | static void applyValuePointerEvents(BuilderState& builderState, CSSValue& value) |
| 2748 | { |
| 2749 | builderState.style().setPointerEvents(downcast<CSSPrimitiveValue>(value)); |
| 2750 | } |
| 2751 | static void applyInitialPosition(BuilderState& builderState) |
| 2752 | { |
| 2753 | builderState.style().setPosition(RenderStyle::initialPosition()); |
| 2754 | } |
| 2755 | static void applyInheritPosition(BuilderState& builderState) |
| 2756 | { |
| 2757 | builderState.style().setPosition(forwardInheritedValue(builderState.parentStyle().position())); |
| 2758 | } |
| 2759 | static void applyValuePosition(BuilderState& builderState, CSSValue& value) |
| 2760 | { |
| 2761 | builderState.style().setPosition(downcast<CSSPrimitiveValue>(value)); |
| 2762 | } |
| 2763 | static void applyInitialQuotes(BuilderState& builderState) |
| 2764 | { |
| 2765 | builderState.style().setQuotes(RenderStyle::initialQuotes()); |
| 2766 | } |
| 2767 | static void applyInheritQuotes(BuilderState& builderState) |
| 2768 | { |
| 2769 | builderState.style().setQuotes(forwardInheritedValue(builderState.parentStyle().quotes())); |
| 2770 | } |
| 2771 | static void applyValueQuotes(BuilderState& builderState, CSSValue& value) |
| 2772 | { |
| 2773 | builderState.style().setQuotes(BuilderConverter::convertQuotes(builderState, value)); |
| 2774 | } |
| 2775 | static void applyInitialR(BuilderState& builderState) |
| 2776 | { |
| 2777 | builderState.style().setR(RenderStyle::initialZeroLength()); |
| 2778 | } |
| 2779 | static void applyInheritR(BuilderState& builderState) |
| 2780 | { |
| 2781 | builderState.style().setR(forwardInheritedValue(builderState.parentStyle().r())); |
| 2782 | } |
| 2783 | static void applyValueR(BuilderState& builderState, CSSValue& value) |
| 2784 | { |
| 2785 | builderState.style().setR(BuilderConverter::convertLength(builderState, value)); |
| 2786 | } |
| 2787 | static void applyInitialResize(BuilderState& builderState) |
| 2788 | { |
| 2789 | builderState.style().setResize(RenderStyle::initialResize()); |
| 2790 | } |
| 2791 | static void applyInheritResize(BuilderState& builderState) |
| 2792 | { |
| 2793 | builderState.style().setResize(forwardInheritedValue(builderState.parentStyle().resize())); |
| 2794 | } |
| 2795 | static void applyValueResize(BuilderState& builderState, CSSValue& value) |
| 2796 | { |
| 2797 | builderState.style().setResize(BuilderConverter::convertResize(builderState, value)); |
| 2798 | } |
| 2799 | static void applyInitialRight(BuilderState& builderState) |
| 2800 | { |
| 2801 | builderState.style().setRight(RenderStyle::initialOffset()); |
| 2802 | } |
| 2803 | static void applyInheritRight(BuilderState& builderState) |
| 2804 | { |
| 2805 | builderState.style().setRight(forwardInheritedValue(builderState.parentStyle().right())); |
| 2806 | } |
| 2807 | static void applyValueRight(BuilderState& builderState, CSSValue& value) |
| 2808 | { |
| 2809 | builderState.style().setRight(BuilderConverter::convertLengthOrAuto(builderState, value)); |
| 2810 | } |
| 2811 | static void applyInitialRotate(BuilderState& builderState) |
| 2812 | { |
| 2813 | builderState.style().setRotate(RenderStyle::initialRotate()); |
| 2814 | } |
| 2815 | static void applyInheritRotate(BuilderState& builderState) |
| 2816 | { |
| 2817 | builderState.style().setRotate(forwardInheritedValue(builderState.parentStyle().rotate())); |
| 2818 | } |
| 2819 | static void applyValueRotate(BuilderState& builderState, CSSValue& value) |
| 2820 | { |
| 2821 | builderState.style().setRotate(BuilderConverter::convertRotate(builderState, value)); |
| 2822 | } |
| 2823 | static void applyInitialRowGap(BuilderState& builderState) |
| 2824 | { |
| 2825 | builderState.style().setRowGap(RenderStyle::initialRowGap()); |
| 2826 | } |
| 2827 | static void applyInheritRowGap(BuilderState& builderState) |
| 2828 | { |
| 2829 | builderState.style().setRowGap(forwardInheritedValue(builderState.parentStyle().rowGap())); |
| 2830 | } |
| 2831 | static void applyValueRowGap(BuilderState& builderState, CSSValue& value) |
| 2832 | { |
| 2833 | builderState.style().setRowGap(BuilderConverter::convertGapLength(builderState, value)); |
| 2834 | } |
| 2835 | static void applyInitialRx(BuilderState& builderState) |
| 2836 | { |
| 2837 | builderState.style().setRx(RenderStyle::initialRadius()); |
| 2838 | } |
| 2839 | static void applyInheritRx(BuilderState& builderState) |
| 2840 | { |
| 2841 | builderState.style().setRx(forwardInheritedValue(builderState.parentStyle().rx())); |
| 2842 | } |
| 2843 | static void applyValueRx(BuilderState& builderState, CSSValue& value) |
| 2844 | { |
| 2845 | builderState.style().setRx(BuilderConverter::convertLengthOrAuto(builderState, value)); |
| 2846 | } |
| 2847 | static void applyInitialRy(BuilderState& builderState) |
| 2848 | { |
| 2849 | builderState.style().setRy(RenderStyle::initialRadius()); |
| 2850 | } |
| 2851 | static void applyInheritRy(BuilderState& builderState) |
| 2852 | { |
| 2853 | builderState.style().setRy(forwardInheritedValue(builderState.parentStyle().ry())); |
| 2854 | } |
| 2855 | static void applyValueRy(BuilderState& builderState, CSSValue& value) |
| 2856 | { |
| 2857 | builderState.style().setRy(BuilderConverter::convertLengthOrAuto(builderState, value)); |
| 2858 | } |
| 2859 | static void applyInitialScale(BuilderState& builderState) |
| 2860 | { |
| 2861 | builderState.style().setScale(RenderStyle::initialScale()); |
| 2862 | } |
| 2863 | static void applyInheritScale(BuilderState& builderState) |
| 2864 | { |
| 2865 | builderState.style().setScale(forwardInheritedValue(builderState.parentStyle().scale())); |
| 2866 | } |
| 2867 | static void applyValueScale(BuilderState& builderState, CSSValue& value) |
| 2868 | { |
| 2869 | builderState.style().setScale(BuilderConverter::convertScale(builderState, value)); |
| 2870 | } |
| 2871 | static void applyInitialScrollBehavior(BuilderState& builderState) |
| 2872 | { |
| 2873 | builderState.style().setUseSmoothScrolling(RenderStyle::initialUseSmoothScrolling()); |
| 2874 | } |
| 2875 | static void applyInheritScrollBehavior(BuilderState& builderState) |
| 2876 | { |
| 2877 | builderState.style().setUseSmoothScrolling(forwardInheritedValue(builderState.parentStyle().useSmoothScrolling())); |
| 2878 | } |
| 2879 | static void applyValueScrollBehavior(BuilderState& builderState, CSSValue& value) |
| 2880 | { |
| 2881 | builderState.style().setUseSmoothScrolling(BuilderConverter::convertSmoothScrolling(builderState, value)); |
| 2882 | } |
| 2883 | static void applyInitialScrollMarginBottom(BuilderState& builderState) |
| 2884 | { |
| 2885 | builderState.style().setScrollMarginBottom(RenderStyle::initialScrollMargin()); |
| 2886 | } |
| 2887 | static void applyInheritScrollMarginBottom(BuilderState& builderState) |
| 2888 | { |
| 2889 | builderState.style().setScrollMarginBottom(forwardInheritedValue(builderState.parentStyle().scrollMarginBottom())); |
| 2890 | } |
| 2891 | static void applyValueScrollMarginBottom(BuilderState& builderState, CSSValue& value) |
| 2892 | { |
| 2893 | builderState.style().setScrollMarginBottom(BuilderConverter::convertLength(builderState, value)); |
| 2894 | } |
| 2895 | static void applyInitialScrollMarginLeft(BuilderState& builderState) |
| 2896 | { |
| 2897 | builderState.style().setScrollMarginLeft(RenderStyle::initialScrollMargin()); |
| 2898 | } |
| 2899 | static void applyInheritScrollMarginLeft(BuilderState& builderState) |
| 2900 | { |
| 2901 | builderState.style().setScrollMarginLeft(forwardInheritedValue(builderState.parentStyle().scrollMarginLeft())); |
| 2902 | } |
| 2903 | static void applyValueScrollMarginLeft(BuilderState& builderState, CSSValue& value) |
| 2904 | { |
| 2905 | builderState.style().setScrollMarginLeft(BuilderConverter::convertLength(builderState, value)); |
| 2906 | } |
| 2907 | static void applyInitialScrollMarginRight(BuilderState& builderState) |
| 2908 | { |
| 2909 | builderState.style().setScrollMarginRight(RenderStyle::initialScrollMargin()); |
| 2910 | } |
| 2911 | static void applyInheritScrollMarginRight(BuilderState& builderState) |
| 2912 | { |
| 2913 | builderState.style().setScrollMarginRight(forwardInheritedValue(builderState.parentStyle().scrollMarginRight())); |
| 2914 | } |
| 2915 | static void applyValueScrollMarginRight(BuilderState& builderState, CSSValue& value) |
| 2916 | { |
| 2917 | builderState.style().setScrollMarginRight(BuilderConverter::convertLength(builderState, value)); |
| 2918 | } |
| 2919 | static void applyInitialScrollMarginTop(BuilderState& builderState) |
| 2920 | { |
| 2921 | builderState.style().setScrollMarginTop(RenderStyle::initialScrollMargin()); |
| 2922 | } |
| 2923 | static void applyInheritScrollMarginTop(BuilderState& builderState) |
| 2924 | { |
| 2925 | builderState.style().setScrollMarginTop(forwardInheritedValue(builderState.parentStyle().scrollMarginTop())); |
| 2926 | } |
| 2927 | static void applyValueScrollMarginTop(BuilderState& builderState, CSSValue& value) |
| 2928 | { |
| 2929 | builderState.style().setScrollMarginTop(BuilderConverter::convertLength(builderState, value)); |
| 2930 | } |
| 2931 | static void applyInitialScrollPaddingBottom(BuilderState& builderState) |
| 2932 | { |
| 2933 | builderState.style().setScrollPaddingBottom(RenderStyle::initialScrollPadding()); |
| 2934 | } |
| 2935 | static void applyInheritScrollPaddingBottom(BuilderState& builderState) |
| 2936 | { |
| 2937 | builderState.style().setScrollPaddingBottom(forwardInheritedValue(builderState.parentStyle().scrollPaddingBottom())); |
| 2938 | } |
| 2939 | static void applyValueScrollPaddingBottom(BuilderState& builderState, CSSValue& value) |
| 2940 | { |
| 2941 | builderState.style().setScrollPaddingBottom(BuilderConverter::convertLengthOrAuto(builderState, value)); |
| 2942 | } |
| 2943 | static void applyInitialScrollPaddingLeft(BuilderState& builderState) |
| 2944 | { |
| 2945 | builderState.style().setScrollPaddingLeft(RenderStyle::initialScrollPadding()); |
| 2946 | } |
| 2947 | static void applyInheritScrollPaddingLeft(BuilderState& builderState) |
| 2948 | { |
| 2949 | builderState.style().setScrollPaddingLeft(forwardInheritedValue(builderState.parentStyle().scrollPaddingLeft())); |
| 2950 | } |
| 2951 | static void applyValueScrollPaddingLeft(BuilderState& builderState, CSSValue& value) |
| 2952 | { |
| 2953 | builderState.style().setScrollPaddingLeft(BuilderConverter::convertLengthOrAuto(builderState, value)); |
| 2954 | } |
| 2955 | static void applyInitialScrollPaddingRight(BuilderState& builderState) |
| 2956 | { |
| 2957 | builderState.style().setScrollPaddingRight(RenderStyle::initialScrollPadding()); |
| 2958 | } |
| 2959 | static void applyInheritScrollPaddingRight(BuilderState& builderState) |
| 2960 | { |
| 2961 | builderState.style().setScrollPaddingRight(forwardInheritedValue(builderState.parentStyle().scrollPaddingRight())); |
| 2962 | } |
| 2963 | static void applyValueScrollPaddingRight(BuilderState& builderState, CSSValue& value) |
| 2964 | { |
| 2965 | builderState.style().setScrollPaddingRight(BuilderConverter::convertLengthOrAuto(builderState, value)); |
| 2966 | } |
| 2967 | static void applyInitialScrollPaddingTop(BuilderState& builderState) |
| 2968 | { |
| 2969 | builderState.style().setScrollPaddingTop(RenderStyle::initialScrollPadding()); |
| 2970 | } |
| 2971 | static void applyInheritScrollPaddingTop(BuilderState& builderState) |
| 2972 | { |
| 2973 | builderState.style().setScrollPaddingTop(forwardInheritedValue(builderState.parentStyle().scrollPaddingTop())); |
| 2974 | } |
| 2975 | static void applyValueScrollPaddingTop(BuilderState& builderState, CSSValue& value) |
| 2976 | { |
| 2977 | builderState.style().setScrollPaddingTop(BuilderConverter::convertLengthOrAuto(builderState, value)); |
| 2978 | } |
| 2979 | static void applyInitialScrollSnapAlign(BuilderState& builderState) |
| 2980 | { |
| 2981 | builderState.style().setScrollSnapAlign(RenderStyle::initialScrollSnapAlign()); |
| 2982 | } |
| 2983 | static void applyInheritScrollSnapAlign(BuilderState& builderState) |
| 2984 | { |
| 2985 | builderState.style().setScrollSnapAlign(forwardInheritedValue(builderState.parentStyle().scrollSnapAlign())); |
| 2986 | } |
| 2987 | static void applyValueScrollSnapAlign(BuilderState& builderState, CSSValue& value) |
| 2988 | { |
| 2989 | builderState.style().setScrollSnapAlign(BuilderConverter::convertScrollSnapAlign(builderState, value)); |
| 2990 | } |
| 2991 | static void applyInitialScrollSnapStop(BuilderState& builderState) |
| 2992 | { |
| 2993 | builderState.style().setScrollSnapStop(RenderStyle::initialScrollSnapStop()); |
| 2994 | } |
| 2995 | static void applyInheritScrollSnapStop(BuilderState& builderState) |
| 2996 | { |
| 2997 | builderState.style().setScrollSnapStop(forwardInheritedValue(builderState.parentStyle().scrollSnapStop())); |
| 2998 | } |
| 2999 | static void applyValueScrollSnapStop(BuilderState& builderState, CSSValue& value) |
| 3000 | { |
| 3001 | builderState.style().setScrollSnapStop(BuilderConverter::convertScrollSnapStop(builderState, value)); |
| 3002 | } |
| 3003 | static void applyInitialScrollSnapType(BuilderState& builderState) |
| 3004 | { |
| 3005 | builderState.style().setScrollSnapType(RenderStyle::initialScrollSnapType()); |
| 3006 | } |
| 3007 | static void applyInheritScrollSnapType(BuilderState& builderState) |
| 3008 | { |
| 3009 | builderState.style().setScrollSnapType(forwardInheritedValue(builderState.parentStyle().scrollSnapType())); |
| 3010 | } |
| 3011 | static void applyValueScrollSnapType(BuilderState& builderState, CSSValue& value) |
| 3012 | { |
| 3013 | builderState.style().setScrollSnapType(BuilderConverter::convertScrollSnapType(builderState, value)); |
| 3014 | } |
| 3015 | static void applyInitialShapeImageThreshold(BuilderState& builderState) |
| 3016 | { |
| 3017 | builderState.style().setShapeImageThreshold(RenderStyle::initialShapeImageThreshold()); |
| 3018 | } |
| 3019 | static void applyInheritShapeImageThreshold(BuilderState& builderState) |
| 3020 | { |
| 3021 | builderState.style().setShapeImageThreshold(forwardInheritedValue(builderState.parentStyle().shapeImageThreshold())); |
| 3022 | } |
| 3023 | static void applyValueShapeImageThreshold(BuilderState& builderState, CSSValue& value) |
| 3024 | { |
| 3025 | builderState.style().setShapeImageThreshold(BuilderConverter::convertNumberOrAuto<float>(builderState, value)); |
| 3026 | } |
| 3027 | static void applyInitialShapeMargin(BuilderState& builderState) |
| 3028 | { |
| 3029 | builderState.style().setShapeMargin(RenderStyle::initialShapeMargin()); |
| 3030 | } |
| 3031 | static void applyInheritShapeMargin(BuilderState& builderState) |
| 3032 | { |
| 3033 | builderState.style().setShapeMargin(forwardInheritedValue(builderState.parentStyle().shapeMargin())); |
| 3034 | } |
| 3035 | static void applyValueShapeMargin(BuilderState& builderState, CSSValue& value) |
| 3036 | { |
| 3037 | builderState.style().setShapeMargin(BuilderConverter::convertLength(builderState, value)); |
| 3038 | } |
| 3039 | static void applyInitialShapeOutside(BuilderState& builderState) |
| 3040 | { |
| 3041 | builderState.style().setShapeOutside(RenderStyle::initialShapeOutside()); |
| 3042 | } |
| 3043 | static void applyInheritShapeOutside(BuilderState& builderState) |
| 3044 | { |
| 3045 | builderState.style().setShapeOutside(forwardInheritedValue(builderState.parentStyle().shapeOutside())); |
| 3046 | } |
| 3047 | static void applyValueShapeOutside(BuilderState& builderState, CSSValue& value) |
| 3048 | { |
| 3049 | builderState.style().setShapeOutside(BuilderConverter::convertShapeValue(builderState, value)); |
| 3050 | } |
| 3051 | static void applyInitialShapeRendering(BuilderState& builderState) |
| 3052 | { |
| 3053 | builderState.style().accessSVGStyle().setShapeRendering(SVGRenderStyle::initialShapeRendering()); |
| 3054 | } |
| 3055 | static void applyInheritShapeRendering(BuilderState& builderState) |
| 3056 | { |
| 3057 | builderState.style().accessSVGStyle().setShapeRendering(forwardInheritedValue(builderState.parentStyle().svgStyle().shapeRendering())); |
| 3058 | } |
| 3059 | static void applyValueShapeRendering(BuilderState& builderState, CSSValue& value) |
| 3060 | { |
| 3061 | builderState.style().accessSVGStyle().setShapeRendering(downcast<CSSPrimitiveValue>(value)); |
| 3062 | } |
| 3063 | static void applyInitialSpeakAs(BuilderState& builderState) |
| 3064 | { |
| 3065 | builderState.style().setSpeakAs(RenderStyle::initialSpeakAs()); |
| 3066 | } |
| 3067 | static void applyInheritSpeakAs(BuilderState& builderState) |
| 3068 | { |
| 3069 | builderState.style().setSpeakAs(forwardInheritedValue(builderState.parentStyle().speakAs())); |
| 3070 | } |
| 3071 | static void applyValueSpeakAs(BuilderState& builderState, CSSValue& value) |
| 3072 | { |
| 3073 | builderState.style().setSpeakAs(BuilderConverter::convertSpeakAs(builderState, value)); |
| 3074 | } |
| 3075 | static void applyInitialStopColor(BuilderState& builderState) |
| 3076 | { |
| 3077 | builderState.style().accessSVGStyle().setStopColor(SVGRenderStyle::initialStopColor()); |
| 3078 | } |
| 3079 | static void applyInheritStopColor(BuilderState& builderState) |
| 3080 | { |
| 3081 | builderState.style().accessSVGStyle().setStopColor(forwardInheritedValue(builderState.parentStyle().svgStyle().stopColor())); |
| 3082 | } |
| 3083 | static void applyValueStopColor(BuilderState& builderState, CSSValue& value) |
| 3084 | { |
| 3085 | builderState.style().accessSVGStyle().setStopColor(BuilderConverter::convertSVGColor(builderState, value)); |
| 3086 | } |
| 3087 | static void applyInitialStopOpacity(BuilderState& builderState) |
| 3088 | { |
| 3089 | builderState.style().accessSVGStyle().setStopOpacity(SVGRenderStyle::initialStopOpacity()); |
| 3090 | } |
| 3091 | static void applyInheritStopOpacity(BuilderState& builderState) |
| 3092 | { |
| 3093 | builderState.style().accessSVGStyle().setStopOpacity(forwardInheritedValue(builderState.parentStyle().svgStyle().stopOpacity())); |
| 3094 | } |
| 3095 | static void applyValueStopOpacity(BuilderState& builderState, CSSValue& value) |
| 3096 | { |
| 3097 | builderState.style().accessSVGStyle().setStopOpacity(BuilderConverter::convertOpacity(builderState, value)); |
| 3098 | } |
| 3099 | static void applyInitialStrokeColor(BuilderState& builderState) |
| 3100 | { |
| 3101 | if (builderState.applyPropertyToRegularStyle()) |
| 3102 | builderState.style().setStrokeColor(RenderStyle::initialStrokeColor()); |
| 3103 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 3104 | builderState.style().setVisitedLinkStrokeColor(RenderStyle::initialStrokeColor()); |
| 3105 | } |
| 3106 | static void applyInheritStrokeColor(BuilderState& builderState) |
| 3107 | { |
| 3108 | Color color = builderState.parentStyle().strokeColor(); |
| 3109 | if (builderState.applyPropertyToRegularStyle()) |
| 3110 | builderState.style().setStrokeColor(color); |
| 3111 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 3112 | builderState.style().setVisitedLinkStrokeColor(color); |
| 3113 | } |
| 3114 | static void applyInitialStrokeDasharray(BuilderState& builderState) |
| 3115 | { |
| 3116 | builderState.style().accessSVGStyle().setStrokeDashArray(SVGRenderStyle::initialStrokeDashArray()); |
| 3117 | } |
| 3118 | static void applyInheritStrokeDasharray(BuilderState& builderState) |
| 3119 | { |
| 3120 | builderState.style().accessSVGStyle().setStrokeDashArray(forwardInheritedValue(builderState.parentStyle().svgStyle().strokeDashArray())); |
| 3121 | } |
| 3122 | static void applyValueStrokeDasharray(BuilderState& builderState, CSSValue& value) |
| 3123 | { |
| 3124 | builderState.style().accessSVGStyle().setStrokeDashArray(BuilderConverter::convertStrokeDashArray(builderState, value)); |
| 3125 | } |
| 3126 | static void applyInitialStrokeDashoffset(BuilderState& builderState) |
| 3127 | { |
| 3128 | builderState.style().setStrokeDashOffset(RenderStyle::initialZeroLength()); |
| 3129 | } |
| 3130 | static void applyInheritStrokeDashoffset(BuilderState& builderState) |
| 3131 | { |
| 3132 | builderState.style().setStrokeDashOffset(forwardInheritedValue(builderState.parentStyle().strokeDashOffset())); |
| 3133 | } |
| 3134 | static void applyValueStrokeDashoffset(BuilderState& builderState, CSSValue& value) |
| 3135 | { |
| 3136 | builderState.style().setStrokeDashOffset(BuilderConverter::convertLength(builderState, value)); |
| 3137 | } |
| 3138 | static void applyInitialStrokeLinecap(BuilderState& builderState) |
| 3139 | { |
| 3140 | builderState.style().setCapStyle(RenderStyle::initialCapStyle()); |
| 3141 | } |
| 3142 | static void applyInheritStrokeLinecap(BuilderState& builderState) |
| 3143 | { |
| 3144 | builderState.style().setCapStyle(forwardInheritedValue(builderState.parentStyle().capStyle())); |
| 3145 | } |
| 3146 | static void applyValueStrokeLinecap(BuilderState& builderState, CSSValue& value) |
| 3147 | { |
| 3148 | builderState.style().setCapStyle(downcast<CSSPrimitiveValue>(value)); |
| 3149 | } |
| 3150 | static void applyInitialStrokeLinejoin(BuilderState& builderState) |
| 3151 | { |
| 3152 | builderState.style().setJoinStyle(RenderStyle::initialJoinStyle()); |
| 3153 | } |
| 3154 | static void applyInheritStrokeLinejoin(BuilderState& builderState) |
| 3155 | { |
| 3156 | builderState.style().setJoinStyle(forwardInheritedValue(builderState.parentStyle().joinStyle())); |
| 3157 | } |
| 3158 | static void applyValueStrokeLinejoin(BuilderState& builderState, CSSValue& value) |
| 3159 | { |
| 3160 | builderState.style().setJoinStyle(downcast<CSSPrimitiveValue>(value)); |
| 3161 | } |
| 3162 | static void applyInitialStrokeMiterlimit(BuilderState& builderState) |
| 3163 | { |
| 3164 | builderState.style().setStrokeMiterLimit(RenderStyle::initialStrokeMiterLimit()); |
| 3165 | } |
| 3166 | static void applyInheritStrokeMiterlimit(BuilderState& builderState) |
| 3167 | { |
| 3168 | builderState.style().setStrokeMiterLimit(forwardInheritedValue(builderState.parentStyle().strokeMiterLimit())); |
| 3169 | } |
| 3170 | static void applyValueStrokeMiterlimit(BuilderState& builderState, CSSValue& value) |
| 3171 | { |
| 3172 | builderState.style().setStrokeMiterLimit(BuilderConverter::convertNumber<float>(builderState, value)); |
| 3173 | } |
| 3174 | static void applyInitialStrokeOpacity(BuilderState& builderState) |
| 3175 | { |
| 3176 | builderState.style().accessSVGStyle().setStrokeOpacity(SVGRenderStyle::initialStrokeOpacity()); |
| 3177 | } |
| 3178 | static void applyInheritStrokeOpacity(BuilderState& builderState) |
| 3179 | { |
| 3180 | builderState.style().accessSVGStyle().setStrokeOpacity(forwardInheritedValue(builderState.parentStyle().svgStyle().strokeOpacity())); |
| 3181 | } |
| 3182 | static void applyValueStrokeOpacity(BuilderState& builderState, CSSValue& value) |
| 3183 | { |
| 3184 | builderState.style().accessSVGStyle().setStrokeOpacity(BuilderConverter::convertOpacity(builderState, value)); |
| 3185 | } |
| 3186 | static void applyInitialStrokeWidth(BuilderState& builderState) |
| 3187 | { |
| 3188 | builderState.style().setStrokeWidth(RenderStyle::initialOneLength()); |
| 3189 | } |
| 3190 | static void applyInheritStrokeWidth(BuilderState& builderState) |
| 3191 | { |
| 3192 | builderState.style().setStrokeWidth(forwardInheritedValue(builderState.parentStyle().strokeWidth())); |
| 3193 | } |
| 3194 | static void applyInitialTabSize(BuilderState& builderState) |
| 3195 | { |
| 3196 | builderState.style().setTabSize(RenderStyle::initialTabSize()); |
| 3197 | } |
| 3198 | static void applyInheritTabSize(BuilderState& builderState) |
| 3199 | { |
| 3200 | builderState.style().setTabSize(forwardInheritedValue(builderState.parentStyle().tabSize())); |
| 3201 | } |
| 3202 | static void applyValueTabSize(BuilderState& builderState, CSSValue& value) |
| 3203 | { |
| 3204 | builderState.style().setTabSize(BuilderConverter::convertTabSize(builderState, value)); |
| 3205 | } |
| 3206 | static void applyInitialTableLayout(BuilderState& builderState) |
| 3207 | { |
| 3208 | builderState.style().setTableLayout(RenderStyle::initialTableLayout()); |
| 3209 | } |
| 3210 | static void applyInheritTableLayout(BuilderState& builderState) |
| 3211 | { |
| 3212 | builderState.style().setTableLayout(forwardInheritedValue(builderState.parentStyle().tableLayout())); |
| 3213 | } |
| 3214 | static void applyValueTableLayout(BuilderState& builderState, CSSValue& value) |
| 3215 | { |
| 3216 | builderState.style().setTableLayout(downcast<CSSPrimitiveValue>(value)); |
| 3217 | } |
| 3218 | static void applyInheritTextAlign(BuilderState& builderState) |
| 3219 | { |
| 3220 | builderState.style().setTextAlign(forwardInheritedValue(builderState.parentStyle().textAlign())); |
| 3221 | } |
| 3222 | static void applyInitialTextAnchor(BuilderState& builderState) |
| 3223 | { |
| 3224 | builderState.style().accessSVGStyle().setTextAnchor(SVGRenderStyle::initialTextAnchor()); |
| 3225 | } |
| 3226 | static void applyInheritTextAnchor(BuilderState& builderState) |
| 3227 | { |
| 3228 | builderState.style().accessSVGStyle().setTextAnchor(forwardInheritedValue(builderState.parentStyle().svgStyle().textAnchor())); |
| 3229 | } |
| 3230 | static void applyValueTextAnchor(BuilderState& builderState, CSSValue& value) |
| 3231 | { |
| 3232 | builderState.style().accessSVGStyle().setTextAnchor(downcast<CSSPrimitiveValue>(value)); |
| 3233 | } |
| 3234 | static void applyInitialTextDecoration(BuilderState& builderState) |
| 3235 | { |
| 3236 | builderState.style().setTextDecoration(RenderStyle::initialTextDecoration()); |
| 3237 | } |
| 3238 | static void applyInheritTextDecoration(BuilderState& builderState) |
| 3239 | { |
| 3240 | builderState.style().setTextDecoration(forwardInheritedValue(builderState.parentStyle().textDecoration())); |
| 3241 | } |
| 3242 | static void applyValueTextDecoration(BuilderState& builderState, CSSValue& value) |
| 3243 | { |
| 3244 | builderState.style().setTextDecoration(BuilderConverter::convertTextDecoration(builderState, value)); |
| 3245 | } |
| 3246 | static void applyInitialTextDecorationColor(BuilderState& builderState) |
| 3247 | { |
| 3248 | if (builderState.applyPropertyToRegularStyle()) |
| 3249 | builderState.style().setTextDecorationColor(RenderStyle::currentColor()); |
| 3250 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 3251 | builderState.style().setVisitedLinkTextDecorationColor(RenderStyle::currentColor()); |
| 3252 | } |
| 3253 | static void applyInheritTextDecorationColor(BuilderState& builderState) |
| 3254 | { |
| 3255 | Color color = builderState.parentStyle().textDecorationColor(); |
| 3256 | if (builderState.applyPropertyToRegularStyle()) |
| 3257 | builderState.style().setTextDecorationColor(color); |
| 3258 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 3259 | builderState.style().setVisitedLinkTextDecorationColor(color); |
| 3260 | } |
| 3261 | static void applyValueTextDecorationColor(BuilderState& builderState, CSSValue& value) |
| 3262 | { |
| 3263 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
| 3264 | if (builderState.applyPropertyToRegularStyle()) |
| 3265 | builderState.style().setTextDecorationColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
| 3266 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 3267 | builderState.style().setVisitedLinkTextDecorationColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
| 3268 | } |
| 3269 | static void applyInitialTextDecorationLine(BuilderState& builderState) |
| 3270 | { |
| 3271 | builderState.style().setTextDecoration(RenderStyle::initialTextDecoration()); |
| 3272 | } |
| 3273 | static void applyInheritTextDecorationLine(BuilderState& builderState) |
| 3274 | { |
| 3275 | builderState.style().setTextDecoration(forwardInheritedValue(builderState.parentStyle().textDecoration())); |
| 3276 | } |
| 3277 | static void applyValueTextDecorationLine(BuilderState& builderState, CSSValue& value) |
| 3278 | { |
| 3279 | builderState.style().setTextDecoration(BuilderConverter::convertTextDecoration(builderState, value)); |
| 3280 | } |
| 3281 | static void applyInitialTextDecorationSkip(BuilderState& builderState) |
| 3282 | { |
| 3283 | builderState.style().setTextDecorationSkip(RenderStyle::initialTextDecorationSkip()); |
| 3284 | } |
| 3285 | static void applyInheritTextDecorationSkip(BuilderState& builderState) |
| 3286 | { |
| 3287 | builderState.style().setTextDecorationSkip(forwardInheritedValue(builderState.parentStyle().textDecorationSkip())); |
| 3288 | } |
| 3289 | static void applyValueTextDecorationSkip(BuilderState& builderState, CSSValue& value) |
| 3290 | { |
| 3291 | builderState.style().setTextDecorationSkip(BuilderConverter::convertTextDecorationSkip(builderState, value)); |
| 3292 | } |
| 3293 | static void applyInitialTextDecorationStyle(BuilderState& builderState) |
| 3294 | { |
| 3295 | builderState.style().setTextDecorationStyle(RenderStyle::initialTextDecorationStyle()); |
| 3296 | } |
| 3297 | static void applyInheritTextDecorationStyle(BuilderState& builderState) |
| 3298 | { |
| 3299 | builderState.style().setTextDecorationStyle(forwardInheritedValue(builderState.parentStyle().textDecorationStyle())); |
| 3300 | } |
| 3301 | static void applyValueTextDecorationStyle(BuilderState& builderState, CSSValue& value) |
| 3302 | { |
| 3303 | builderState.style().setTextDecorationStyle(downcast<CSSPrimitiveValue>(value)); |
| 3304 | } |
| 3305 | static void applyInitialTextDecorationThickness(BuilderState& builderState) |
| 3306 | { |
| 3307 | builderState.style().setTextDecorationThickness(RenderStyle::initialTextDecorationThickness()); |
| 3308 | } |
| 3309 | static void applyInheritTextDecorationThickness(BuilderState& builderState) |
| 3310 | { |
| 3311 | builderState.style().setTextDecorationThickness(forwardInheritedValue(builderState.parentStyle().textDecorationThickness())); |
| 3312 | } |
| 3313 | static void applyValueTextDecorationThickness(BuilderState& builderState, CSSValue& value) |
| 3314 | { |
| 3315 | builderState.style().setTextDecorationThickness(BuilderConverter::convertTextDecorationThickness(builderState, value)); |
| 3316 | } |
| 3317 | static void applyInitialTextOverflow(BuilderState& builderState) |
| 3318 | { |
| 3319 | builderState.style().setTextOverflow(RenderStyle::initialTextOverflow()); |
| 3320 | } |
| 3321 | static void applyInheritTextOverflow(BuilderState& builderState) |
| 3322 | { |
| 3323 | builderState.style().setTextOverflow(forwardInheritedValue(builderState.parentStyle().textOverflow())); |
| 3324 | } |
| 3325 | static void applyValueTextOverflow(BuilderState& builderState, CSSValue& value) |
| 3326 | { |
| 3327 | builderState.style().setTextOverflow(downcast<CSSPrimitiveValue>(value)); |
| 3328 | } |
| 3329 | static void applyInitialTextTransform(BuilderState& builderState) |
| 3330 | { |
| 3331 | builderState.style().setTextTransform(RenderStyle::initialTextTransform()); |
| 3332 | } |
| 3333 | static void applyInheritTextTransform(BuilderState& builderState) |
| 3334 | { |
| 3335 | builderState.style().setTextTransform(forwardInheritedValue(builderState.parentStyle().textTransform())); |
| 3336 | } |
| 3337 | static void applyValueTextTransform(BuilderState& builderState, CSSValue& value) |
| 3338 | { |
| 3339 | builderState.style().setTextTransform(downcast<CSSPrimitiveValue>(value)); |
| 3340 | } |
| 3341 | static void applyInitialTextUnderlineOffset(BuilderState& builderState) |
| 3342 | { |
| 3343 | builderState.style().setTextUnderlineOffset(RenderStyle::initialTextUnderlineOffset()); |
| 3344 | } |
| 3345 | static void applyInheritTextUnderlineOffset(BuilderState& builderState) |
| 3346 | { |
| 3347 | builderState.style().setTextUnderlineOffset(forwardInheritedValue(builderState.parentStyle().textUnderlineOffset())); |
| 3348 | } |
| 3349 | static void applyValueTextUnderlineOffset(BuilderState& builderState, CSSValue& value) |
| 3350 | { |
| 3351 | builderState.style().setTextUnderlineOffset(BuilderConverter::convertTextUnderlineOffset(builderState, value)); |
| 3352 | } |
| 3353 | static void applyInitialTextUnderlinePosition(BuilderState& builderState) |
| 3354 | { |
| 3355 | builderState.style().setTextUnderlinePosition(RenderStyle::initialTextUnderlinePosition()); |
| 3356 | } |
| 3357 | static void applyInheritTextUnderlinePosition(BuilderState& builderState) |
| 3358 | { |
| 3359 | builderState.style().setTextUnderlinePosition(forwardInheritedValue(builderState.parentStyle().textUnderlinePosition())); |
| 3360 | } |
| 3361 | static void applyValueTextUnderlinePosition(BuilderState& builderState, CSSValue& value) |
| 3362 | { |
| 3363 | builderState.style().setTextUnderlinePosition(downcast<CSSPrimitiveValue>(value)); |
| 3364 | } |
| 3365 | static void applyInitialTop(BuilderState& builderState) |
| 3366 | { |
| 3367 | builderState.style().setTop(RenderStyle::initialOffset()); |
| 3368 | } |
| 3369 | static void applyInheritTop(BuilderState& builderState) |
| 3370 | { |
| 3371 | builderState.style().setTop(forwardInheritedValue(builderState.parentStyle().top())); |
| 3372 | } |
| 3373 | static void applyValueTop(BuilderState& builderState, CSSValue& value) |
| 3374 | { |
| 3375 | builderState.style().setTop(BuilderConverter::convertLengthOrAuto(builderState, value)); |
| 3376 | } |
| 3377 | static void applyInitialTouchAction(BuilderState& builderState) |
| 3378 | { |
| 3379 | builderState.style().setTouchActions(RenderStyle::initialTouchActions()); |
| 3380 | } |
| 3381 | static void applyInheritTouchAction(BuilderState& builderState) |
| 3382 | { |
| 3383 | builderState.style().setTouchActions(forwardInheritedValue(builderState.parentStyle().touchActions())); |
| 3384 | } |
| 3385 | static void applyValueTouchAction(BuilderState& builderState, CSSValue& value) |
| 3386 | { |
| 3387 | builderState.style().setTouchActions(BuilderConverter::convertTouchAction(builderState, value)); |
| 3388 | } |
| 3389 | static void applyInitialTransform(BuilderState& builderState) |
| 3390 | { |
| 3391 | builderState.style().setTransform(RenderStyle::initialTransform()); |
| 3392 | } |
| 3393 | static void applyInheritTransform(BuilderState& builderState) |
| 3394 | { |
| 3395 | builderState.style().setTransform(forwardInheritedValue(builderState.parentStyle().transform())); |
| 3396 | } |
| 3397 | static void applyValueTransform(BuilderState& builderState, CSSValue& value) |
| 3398 | { |
| 3399 | builderState.style().setTransform(BuilderConverter::convertTransform(builderState, value)); |
| 3400 | } |
| 3401 | static void applyInitialTransformBox(BuilderState& builderState) |
| 3402 | { |
| 3403 | builderState.style().setTransformBox(RenderStyle::initialTransformBox()); |
| 3404 | } |
| 3405 | static void applyInheritTransformBox(BuilderState& builderState) |
| 3406 | { |
| 3407 | builderState.style().setTransformBox(forwardInheritedValue(builderState.parentStyle().transformBox())); |
| 3408 | } |
| 3409 | static void applyValueTransformBox(BuilderState& builderState, CSSValue& value) |
| 3410 | { |
| 3411 | builderState.style().setTransformBox(downcast<CSSPrimitiveValue>(value)); |
| 3412 | } |
| 3413 | static void applyInitialTransformOriginX(BuilderState& builderState) |
| 3414 | { |
| 3415 | builderState.style().setTransformOriginX(RenderStyle::initialTransformOriginX()); |
| 3416 | } |
| 3417 | static void applyInheritTransformOriginX(BuilderState& builderState) |
| 3418 | { |
| 3419 | builderState.style().setTransformOriginX(forwardInheritedValue(builderState.parentStyle().transformOriginX())); |
| 3420 | } |
| 3421 | static void applyValueTransformOriginX(BuilderState& builderState, CSSValue& value) |
| 3422 | { |
| 3423 | builderState.style().setTransformOriginX(BuilderConverter::convertPositionComponentX(builderState, value)); |
| 3424 | } |
| 3425 | static void applyInitialTransformOriginY(BuilderState& builderState) |
| 3426 | { |
| 3427 | builderState.style().setTransformOriginY(RenderStyle::initialTransformOriginY()); |
| 3428 | } |
| 3429 | static void applyInheritTransformOriginY(BuilderState& builderState) |
| 3430 | { |
| 3431 | builderState.style().setTransformOriginY(forwardInheritedValue(builderState.parentStyle().transformOriginY())); |
| 3432 | } |
| 3433 | static void applyValueTransformOriginY(BuilderState& builderState, CSSValue& value) |
| 3434 | { |
| 3435 | builderState.style().setTransformOriginY(BuilderConverter::convertPositionComponentY(builderState, value)); |
| 3436 | } |
| 3437 | static void applyInitialTransformOriginZ(BuilderState& builderState) |
| 3438 | { |
| 3439 | builderState.style().setTransformOriginZ(RenderStyle::initialTransformOriginZ()); |
| 3440 | } |
| 3441 | static void applyInheritTransformOriginZ(BuilderState& builderState) |
| 3442 | { |
| 3443 | builderState.style().setTransformOriginZ(forwardInheritedValue(builderState.parentStyle().transformOriginZ())); |
| 3444 | } |
| 3445 | static void applyValueTransformOriginZ(BuilderState& builderState, CSSValue& value) |
| 3446 | { |
| 3447 | builderState.style().setTransformOriginZ(BuilderConverter::convertComputedLength<float>(builderState, value)); |
| 3448 | } |
| 3449 | static void applyInitialTransformStyle(BuilderState& builderState) |
| 3450 | { |
| 3451 | builderState.style().setTransformStyle3D(RenderStyle::initialTransformStyle3D()); |
| 3452 | } |
| 3453 | static void applyInheritTransformStyle(BuilderState& builderState) |
| 3454 | { |
| 3455 | builderState.style().setTransformStyle3D(forwardInheritedValue(builderState.parentStyle().transformStyle3D())); |
| 3456 | } |
| 3457 | static void applyValueTransformStyle(BuilderState& builderState, CSSValue& value) |
| 3458 | { |
| 3459 | builderState.style().setTransformStyle3D(downcast<CSSPrimitiveValue>(value)); |
| 3460 | } |
| 3461 | static void applyInitialTransitionDelay(BuilderState& builderState) |
| 3462 | { |
| 3463 | AnimationList& list = builderState.style().ensureTransitions(); |
| 3464 | if (list.isEmpty()) |
| 3465 | list.append(Animation::create()); |
| 3466 | list.animation(0).setDelay(Animation::initialDelay()); |
| 3467 | for (size_t i = 1; i < list.size(); ++i) |
| 3468 | list.animation(i).clearDelay(); |
| 3469 | } |
| 3470 | static void applyInheritTransitionDelay(BuilderState& builderState) |
| 3471 | { |
| 3472 | auto& list = builderState.style().ensureTransitions(); |
| 3473 | auto* parentList = builderState.parentStyle().transitions(); |
| 3474 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
| 3475 | for ( ; i < parentSize && parentList->animation(i).isDelaySet(); ++i) { |
| 3476 | if (list.size() <= i) |
| 3477 | list.append(Animation::create()); |
| 3478 | list.animation(i).setDelay(parentList->animation(i).delay()); |
| 3479 | } |
| 3480 | |
| 3481 | // Reset any remaining animations to not have the property set. |
| 3482 | for ( ; i < list.size(); ++i) |
| 3483 | list.animation(i).clearDelay(); |
| 3484 | } |
| 3485 | static void applyValueTransitionDelay(BuilderState& builderState, CSSValue& value) |
| 3486 | { |
| 3487 | AnimationList& list = builderState.style().ensureTransitions(); |
| 3488 | size_t childIndex = 0; |
| 3489 | if (is<CSSValueList>(value)) { |
| 3490 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
| 3491 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
| 3492 | if (childIndex <= list.size()) |
| 3493 | list.append(Animation::create()); |
| 3494 | builderState.styleMap().mapAnimationDelay(list.animation(childIndex), currentValue); |
| 3495 | ++childIndex; |
| 3496 | } |
| 3497 | } else { |
| 3498 | if (list.isEmpty()) |
| 3499 | list.append(Animation::create()); |
| 3500 | builderState.styleMap().mapAnimationDelay(list.animation(childIndex), value); |
| 3501 | childIndex = 1; |
| 3502 | } |
| 3503 | for ( ; childIndex < list.size(); ++childIndex) { |
| 3504 | /* Reset all remaining animations to not have the property set. */ |
| 3505 | list.animation(childIndex).clearDelay(); |
| 3506 | } |
| 3507 | } |
| 3508 | static void applyInitialTransitionDuration(BuilderState& builderState) |
| 3509 | { |
| 3510 | AnimationList& list = builderState.style().ensureTransitions(); |
| 3511 | if (list.isEmpty()) |
| 3512 | list.append(Animation::create()); |
| 3513 | list.animation(0).setDuration(Animation::initialDuration()); |
| 3514 | for (size_t i = 1; i < list.size(); ++i) |
| 3515 | list.animation(i).clearDuration(); |
| 3516 | } |
| 3517 | static void applyInheritTransitionDuration(BuilderState& builderState) |
| 3518 | { |
| 3519 | auto& list = builderState.style().ensureTransitions(); |
| 3520 | auto* parentList = builderState.parentStyle().transitions(); |
| 3521 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
| 3522 | for ( ; i < parentSize && parentList->animation(i).isDurationSet(); ++i) { |
| 3523 | if (list.size() <= i) |
| 3524 | list.append(Animation::create()); |
| 3525 | list.animation(i).setDuration(parentList->animation(i).duration()); |
| 3526 | } |
| 3527 | |
| 3528 | // Reset any remaining animations to not have the property set. |
| 3529 | for ( ; i < list.size(); ++i) |
| 3530 | list.animation(i).clearDuration(); |
| 3531 | } |
| 3532 | static void applyValueTransitionDuration(BuilderState& builderState, CSSValue& value) |
| 3533 | { |
| 3534 | AnimationList& list = builderState.style().ensureTransitions(); |
| 3535 | size_t childIndex = 0; |
| 3536 | if (is<CSSValueList>(value)) { |
| 3537 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
| 3538 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
| 3539 | if (childIndex <= list.size()) |
| 3540 | list.append(Animation::create()); |
| 3541 | builderState.styleMap().mapAnimationDuration(list.animation(childIndex), currentValue); |
| 3542 | ++childIndex; |
| 3543 | } |
| 3544 | } else { |
| 3545 | if (list.isEmpty()) |
| 3546 | list.append(Animation::create()); |
| 3547 | builderState.styleMap().mapAnimationDuration(list.animation(childIndex), value); |
| 3548 | childIndex = 1; |
| 3549 | } |
| 3550 | for ( ; childIndex < list.size(); ++childIndex) { |
| 3551 | /* Reset all remaining animations to not have the property set. */ |
| 3552 | list.animation(childIndex).clearDuration(); |
| 3553 | } |
| 3554 | } |
| 3555 | static void applyInitialTransitionProperty(BuilderState& builderState) |
| 3556 | { |
| 3557 | AnimationList& list = builderState.style().ensureTransitions(); |
| 3558 | if (list.isEmpty()) |
| 3559 | list.append(Animation::create()); |
| 3560 | list.animation(0).setProperty(Animation::initialProperty()); |
| 3561 | for (size_t i = 1; i < list.size(); ++i) |
| 3562 | list.animation(i).clearProperty(); |
| 3563 | } |
| 3564 | static void applyInheritTransitionProperty(BuilderState& builderState) |
| 3565 | { |
| 3566 | auto& list = builderState.style().ensureTransitions(); |
| 3567 | auto* parentList = builderState.parentStyle().transitions(); |
| 3568 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
| 3569 | for ( ; i < parentSize && parentList->animation(i).isPropertySet(); ++i) { |
| 3570 | if (list.size() <= i) |
| 3571 | list.append(Animation::create()); |
| 3572 | list.animation(i).setProperty(parentList->animation(i).property()); |
| 3573 | } |
| 3574 | |
| 3575 | // Reset any remaining animations to not have the property set. |
| 3576 | for ( ; i < list.size(); ++i) |
| 3577 | list.animation(i).clearProperty(); |
| 3578 | } |
| 3579 | static void applyValueTransitionProperty(BuilderState& builderState, CSSValue& value) |
| 3580 | { |
| 3581 | AnimationList& list = builderState.style().ensureTransitions(); |
| 3582 | size_t childIndex = 0; |
| 3583 | if (is<CSSValueList>(value)) { |
| 3584 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
| 3585 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
| 3586 | if (childIndex <= list.size()) |
| 3587 | list.append(Animation::create()); |
| 3588 | builderState.styleMap().mapAnimationProperty(list.animation(childIndex), currentValue); |
| 3589 | ++childIndex; |
| 3590 | } |
| 3591 | } else { |
| 3592 | if (list.isEmpty()) |
| 3593 | list.append(Animation::create()); |
| 3594 | builderState.styleMap().mapAnimationProperty(list.animation(childIndex), value); |
| 3595 | childIndex = 1; |
| 3596 | } |
| 3597 | for ( ; childIndex < list.size(); ++childIndex) { |
| 3598 | /* Reset all remaining animations to not have the property set. */ |
| 3599 | list.animation(childIndex).clearProperty(); |
| 3600 | } |
| 3601 | } |
| 3602 | static void applyInitialTransitionTimingFunction(BuilderState& builderState) |
| 3603 | { |
| 3604 | AnimationList& list = builderState.style().ensureTransitions(); |
| 3605 | if (list.isEmpty()) |
| 3606 | list.append(Animation::create()); |
| 3607 | list.animation(0).setTimingFunction(Animation::initialTimingFunction()); |
| 3608 | for (size_t i = 1; i < list.size(); ++i) |
| 3609 | list.animation(i).clearTimingFunction(); |
| 3610 | } |
| 3611 | static void applyInheritTransitionTimingFunction(BuilderState& builderState) |
| 3612 | { |
| 3613 | auto& list = builderState.style().ensureTransitions(); |
| 3614 | auto* parentList = builderState.parentStyle().transitions(); |
| 3615 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
| 3616 | for ( ; i < parentSize && parentList->animation(i).isTimingFunctionSet(); ++i) { |
| 3617 | if (list.size() <= i) |
| 3618 | list.append(Animation::create()); |
| 3619 | list.animation(i).setTimingFunction(parentList->animation(i).timingFunction()); |
| 3620 | } |
| 3621 | |
| 3622 | // Reset any remaining animations to not have the property set. |
| 3623 | for ( ; i < list.size(); ++i) |
| 3624 | list.animation(i).clearTimingFunction(); |
| 3625 | } |
| 3626 | static void applyValueTransitionTimingFunction(BuilderState& builderState, CSSValue& value) |
| 3627 | { |
| 3628 | AnimationList& list = builderState.style().ensureTransitions(); |
| 3629 | size_t childIndex = 0; |
| 3630 | if (is<CSSValueList>(value)) { |
| 3631 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
| 3632 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
| 3633 | if (childIndex <= list.size()) |
| 3634 | list.append(Animation::create()); |
| 3635 | builderState.styleMap().mapAnimationTimingFunction(list.animation(childIndex), currentValue); |
| 3636 | ++childIndex; |
| 3637 | } |
| 3638 | } else { |
| 3639 | if (list.isEmpty()) |
| 3640 | list.append(Animation::create()); |
| 3641 | builderState.styleMap().mapAnimationTimingFunction(list.animation(childIndex), value); |
| 3642 | childIndex = 1; |
| 3643 | } |
| 3644 | for ( ; childIndex < list.size(); ++childIndex) { |
| 3645 | /* Reset all remaining animations to not have the property set. */ |
| 3646 | list.animation(childIndex).clearTimingFunction(); |
| 3647 | } |
| 3648 | } |
| 3649 | static void applyInitialTranslate(BuilderState& builderState) |
| 3650 | { |
| 3651 | builderState.style().setTranslate(RenderStyle::initialTranslate()); |
| 3652 | } |
| 3653 | static void applyInheritTranslate(BuilderState& builderState) |
| 3654 | { |
| 3655 | builderState.style().setTranslate(forwardInheritedValue(builderState.parentStyle().translate())); |
| 3656 | } |
| 3657 | static void applyValueTranslate(BuilderState& builderState, CSSValue& value) |
| 3658 | { |
| 3659 | builderState.style().setTranslate(BuilderConverter::convertTranslate(builderState, value)); |
| 3660 | } |
| 3661 | static void applyInitialUnicodeBidi(BuilderState& builderState) |
| 3662 | { |
| 3663 | builderState.style().setUnicodeBidi(RenderStyle::initialUnicodeBidi()); |
| 3664 | } |
| 3665 | static void applyInheritUnicodeBidi(BuilderState& builderState) |
| 3666 | { |
| 3667 | builderState.style().setUnicodeBidi(forwardInheritedValue(builderState.parentStyle().unicodeBidi())); |
| 3668 | } |
| 3669 | static void applyValueUnicodeBidi(BuilderState& builderState, CSSValue& value) |
| 3670 | { |
| 3671 | builderState.style().setUnicodeBidi(downcast<CSSPrimitiveValue>(value)); |
| 3672 | } |
| 3673 | static void applyInitialVectorEffect(BuilderState& builderState) |
| 3674 | { |
| 3675 | builderState.style().accessSVGStyle().setVectorEffect(SVGRenderStyle::initialVectorEffect()); |
| 3676 | } |
| 3677 | static void applyInheritVectorEffect(BuilderState& builderState) |
| 3678 | { |
| 3679 | builderState.style().accessSVGStyle().setVectorEffect(forwardInheritedValue(builderState.parentStyle().svgStyle().vectorEffect())); |
| 3680 | } |
| 3681 | static void applyValueVectorEffect(BuilderState& builderState, CSSValue& value) |
| 3682 | { |
| 3683 | builderState.style().accessSVGStyle().setVectorEffect(downcast<CSSPrimitiveValue>(value)); |
| 3684 | } |
| 3685 | static void applyInitialVerticalAlign(BuilderState& builderState) |
| 3686 | { |
| 3687 | builderState.style().setVerticalAlign(RenderStyle::initialVerticalAlign()); |
| 3688 | } |
| 3689 | static void applyInitialVisibility(BuilderState& builderState) |
| 3690 | { |
| 3691 | builderState.style().setVisibility(RenderStyle::initialVisibility()); |
| 3692 | } |
| 3693 | static void applyInheritVisibility(BuilderState& builderState) |
| 3694 | { |
| 3695 | builderState.style().setVisibility(forwardInheritedValue(builderState.parentStyle().visibility())); |
| 3696 | } |
| 3697 | static void applyValueVisibility(BuilderState& builderState, CSSValue& value) |
| 3698 | { |
| 3699 | builderState.style().setVisibility(downcast<CSSPrimitiveValue>(value)); |
| 3700 | } |
| 3701 | static void applyInitialWhiteSpace(BuilderState& builderState) |
| 3702 | { |
| 3703 | builderState.style().setWhiteSpace(RenderStyle::initialWhiteSpace()); |
| 3704 | } |
| 3705 | static void applyInheritWhiteSpace(BuilderState& builderState) |
| 3706 | { |
| 3707 | builderState.style().setWhiteSpace(forwardInheritedValue(builderState.parentStyle().whiteSpace())); |
| 3708 | } |
| 3709 | static void applyValueWhiteSpace(BuilderState& builderState, CSSValue& value) |
| 3710 | { |
| 3711 | builderState.style().setWhiteSpace(downcast<CSSPrimitiveValue>(value)); |
| 3712 | } |
| 3713 | static void applyInitialWidows(BuilderState& builderState) |
| 3714 | { |
| 3715 | builderState.style().setHasAutoWidows(); |
| 3716 | } |
| 3717 | static void applyInheritWidows(BuilderState& builderState) |
| 3718 | { |
| 3719 | if (builderState.parentStyle().hasAutoWidows()) { |
| 3720 | builderState.style().setHasAutoWidows(); |
| 3721 | return; |
| 3722 | } |
| 3723 | builderState.style().setWidows(forwardInheritedValue(builderState.parentStyle().widows())); |
| 3724 | } |
| 3725 | static void applyValueWidows(BuilderState& builderState, CSSValue& value) |
| 3726 | { |
| 3727 | if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto) { |
| 3728 | builderState.style().setHasAutoWidows(); |
| 3729 | return; |
| 3730 | } |
| 3731 | builderState.style().setWidows(downcast<CSSPrimitiveValue>(value)); |
| 3732 | } |
| 3733 | static void applyInitialWidth(BuilderState& builderState) |
| 3734 | { |
| 3735 | builderState.style().setWidth(RenderStyle::initialSize()); |
| 3736 | } |
| 3737 | static void applyInheritWidth(BuilderState& builderState) |
| 3738 | { |
| 3739 | builderState.style().setWidth(forwardInheritedValue(builderState.parentStyle().width())); |
| 3740 | } |
| 3741 | static void applyValueWidth(BuilderState& builderState, CSSValue& value) |
| 3742 | { |
| 3743 | builderState.style().setWidth(BuilderConverter::convertLengthSizing(builderState, value)); |
| 3744 | } |
| 3745 | static void applyInitialWillChange(BuilderState& builderState) |
| 3746 | { |
| 3747 | builderState.style().setWillChange(RenderStyle::initialWillChange()); |
| 3748 | } |
| 3749 | static void applyInheritWillChange(BuilderState& builderState) |
| 3750 | { |
| 3751 | builderState.style().setWillChange(forwardInheritedValue(builderState.parentStyle().willChange())); |
| 3752 | } |
| 3753 | static void applyInitialWordBreak(BuilderState& builderState) |
| 3754 | { |
| 3755 | builderState.style().setWordBreak(RenderStyle::initialWordBreak()); |
| 3756 | } |
| 3757 | static void applyInheritWordBreak(BuilderState& builderState) |
| 3758 | { |
| 3759 | builderState.style().setWordBreak(forwardInheritedValue(builderState.parentStyle().wordBreak())); |
| 3760 | } |
| 3761 | static void applyValueWordBreak(BuilderState& builderState, CSSValue& value) |
| 3762 | { |
| 3763 | builderState.style().setWordBreak(downcast<CSSPrimitiveValue>(value)); |
| 3764 | } |
| 3765 | static void applyInitialWordSpacing(BuilderState& builderState) |
| 3766 | { |
| 3767 | builderState.style().setWordSpacing(RenderStyle::initialWordSpacing()); |
| 3768 | } |
| 3769 | static void applyInheritWordSpacing(BuilderState& builderState) |
| 3770 | { |
| 3771 | builderState.style().setWordSpacing(forwardInheritedValue(builderState.parentStyle().wordSpacing())); |
| 3772 | } |
| 3773 | static void applyValueWordSpacing(BuilderState& builderState, CSSValue& value) |
| 3774 | { |
| 3775 | auto convertedValue = BuilderConverter::convertWordSpacing(builderState, value); |
| 3776 | if (convertedValue) |
| 3777 | builderState.style().setWordSpacing(WTFMove(convertedValue.value())); |
| 3778 | } |
| 3779 | static void applyInitialWordWrap(BuilderState& builderState) |
| 3780 | { |
| 3781 | builderState.style().setOverflowWrap(RenderStyle::initialOverflowWrap()); |
| 3782 | } |
| 3783 | static void applyInheritWordWrap(BuilderState& builderState) |
| 3784 | { |
| 3785 | builderState.style().setOverflowWrap(forwardInheritedValue(builderState.parentStyle().overflowWrap())); |
| 3786 | } |
| 3787 | static void applyValueWordWrap(BuilderState& builderState, CSSValue& value) |
| 3788 | { |
| 3789 | builderState.style().setOverflowWrap(downcast<CSSPrimitiveValue>(value)); |
| 3790 | } |
| 3791 | static void applyInitialX(BuilderState& builderState) |
| 3792 | { |
| 3793 | builderState.style().setX(RenderStyle::initialZeroLength()); |
| 3794 | } |
| 3795 | static void applyInheritX(BuilderState& builderState) |
| 3796 | { |
| 3797 | builderState.style().setX(forwardInheritedValue(builderState.parentStyle().x())); |
| 3798 | } |
| 3799 | static void applyValueX(BuilderState& builderState, CSSValue& value) |
| 3800 | { |
| 3801 | builderState.style().setX(BuilderConverter::convertLength(builderState, value)); |
| 3802 | } |
| 3803 | static void applyInitialY(BuilderState& builderState) |
| 3804 | { |
| 3805 | builderState.style().setY(RenderStyle::initialZeroLength()); |
| 3806 | } |
| 3807 | static void applyInheritY(BuilderState& builderState) |
| 3808 | { |
| 3809 | builderState.style().setY(forwardInheritedValue(builderState.parentStyle().y())); |
| 3810 | } |
| 3811 | static void applyValueY(BuilderState& builderState, CSSValue& value) |
| 3812 | { |
| 3813 | builderState.style().setY(BuilderConverter::convertLength(builderState, value)); |
| 3814 | } |
| 3815 | static void applyInitialZIndex(BuilderState& builderState) |
| 3816 | { |
| 3817 | builderState.style().setHasAutoSpecifiedZIndex(); |
| 3818 | } |
| 3819 | static void applyInheritZIndex(BuilderState& builderState) |
| 3820 | { |
| 3821 | if (builderState.parentStyle().hasAutoSpecifiedZIndex()) { |
| 3822 | builderState.style().setHasAutoSpecifiedZIndex(); |
| 3823 | return; |
| 3824 | } |
| 3825 | builderState.style().setSpecifiedZIndex(forwardInheritedValue(builderState.parentStyle().specifiedZIndex())); |
| 3826 | } |
| 3827 | static void applyValueZIndex(BuilderState& builderState, CSSValue& value) |
| 3828 | { |
| 3829 | if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto) { |
| 3830 | builderState.style().setHasAutoSpecifiedZIndex(); |
| 3831 | return; |
| 3832 | } |
| 3833 | builderState.style().setSpecifiedZIndex(downcast<CSSPrimitiveValue>(value)); |
| 3834 | } |
| 3835 | static void applyInitialAppleColorFilter(BuilderState& builderState) |
| 3836 | { |
| 3837 | builderState.style().setAppleColorFilter(RenderStyle::initialAppleColorFilter()); |
| 3838 | } |
| 3839 | static void applyInheritAppleColorFilter(BuilderState& builderState) |
| 3840 | { |
| 3841 | builderState.style().setAppleColorFilter(forwardInheritedValue(builderState.parentStyle().appleColorFilter())); |
| 3842 | } |
| 3843 | static void applyValueAppleColorFilter(BuilderState& builderState, CSSValue& value) |
| 3844 | { |
| 3845 | auto convertedValue = BuilderConverter::convertFilterOperations(builderState, value); |
| 3846 | if (convertedValue) |
| 3847 | builderState.style().setAppleColorFilter(WTFMove(convertedValue.value())); |
| 3848 | } |
| 3849 | static void applyInitialApplePayButtonStyle(BuilderState& builderState) |
| 3850 | { |
| 3851 | builderState.style().setApplePayButtonStyle(RenderStyle::initialApplePayButtonStyle()); |
| 3852 | } |
| 3853 | static void applyInheritApplePayButtonStyle(BuilderState& builderState) |
| 3854 | { |
| 3855 | builderState.style().setApplePayButtonStyle(forwardInheritedValue(builderState.parentStyle().applePayButtonStyle())); |
| 3856 | } |
| 3857 | static void applyValueApplePayButtonStyle(BuilderState& builderState, CSSValue& value) |
| 3858 | { |
| 3859 | builderState.style().setApplePayButtonStyle(downcast<CSSPrimitiveValue>(value)); |
| 3860 | } |
| 3861 | static void applyInitialApplePayButtonType(BuilderState& builderState) |
| 3862 | { |
| 3863 | builderState.style().setApplePayButtonType(RenderStyle::initialApplePayButtonType()); |
| 3864 | } |
| 3865 | static void applyInheritApplePayButtonType(BuilderState& builderState) |
| 3866 | { |
| 3867 | builderState.style().setApplePayButtonType(forwardInheritedValue(builderState.parentStyle().applePayButtonType())); |
| 3868 | } |
| 3869 | static void applyValueApplePayButtonType(BuilderState& builderState, CSSValue& value) |
| 3870 | { |
| 3871 | builderState.style().setApplePayButtonType(downcast<CSSPrimitiveValue>(value)); |
| 3872 | } |
| 3873 | static void applyInitialAppleTrailingWord(BuilderState& builderState) |
| 3874 | { |
| 3875 | builderState.style().setTrailingWord(RenderStyle::initialTrailingWord()); |
| 3876 | } |
| 3877 | static void applyInheritAppleTrailingWord(BuilderState& builderState) |
| 3878 | { |
| 3879 | builderState.style().setTrailingWord(forwardInheritedValue(builderState.parentStyle().trailingWord())); |
| 3880 | } |
| 3881 | static void applyValueAppleTrailingWord(BuilderState& builderState, CSSValue& value) |
| 3882 | { |
| 3883 | builderState.style().setTrailingWord(downcast<CSSPrimitiveValue>(value)); |
| 3884 | } |
| 3885 | static void applyInitialWebkitAppearance(BuilderState& builderState) |
| 3886 | { |
| 3887 | builderState.style().setAppearance(RenderStyle::initialAppearance()); |
| 3888 | } |
| 3889 | static void applyInheritWebkitAppearance(BuilderState& builderState) |
| 3890 | { |
| 3891 | builderState.style().setAppearance(forwardInheritedValue(builderState.parentStyle().appearance())); |
| 3892 | } |
| 3893 | static void applyValueWebkitAppearance(BuilderState& builderState, CSSValue& value) |
| 3894 | { |
| 3895 | builderState.style().setAppearance(downcast<CSSPrimitiveValue>(value)); |
| 3896 | } |
| 3897 | static void applyInitialWebkitBackdropFilter(BuilderState& builderState) |
| 3898 | { |
| 3899 | builderState.style().setBackdropFilter(RenderStyle::initialBackdropFilter()); |
| 3900 | } |
| 3901 | static void applyInheritWebkitBackdropFilter(BuilderState& builderState) |
| 3902 | { |
| 3903 | builderState.style().setBackdropFilter(forwardInheritedValue(builderState.parentStyle().backdropFilter())); |
| 3904 | } |
| 3905 | static void applyValueWebkitBackdropFilter(BuilderState& builderState, CSSValue& value) |
| 3906 | { |
| 3907 | auto convertedValue = BuilderConverter::convertFilterOperations(builderState, value); |
| 3908 | if (convertedValue) |
| 3909 | builderState.style().setBackdropFilter(WTFMove(convertedValue.value())); |
| 3910 | } |
| 3911 | static void applyInitialWebkitBackfaceVisibility(BuilderState& builderState) |
| 3912 | { |
| 3913 | builderState.style().setBackfaceVisibility(RenderStyle::initialBackfaceVisibility()); |
| 3914 | } |
| 3915 | static void applyInheritWebkitBackfaceVisibility(BuilderState& builderState) |
| 3916 | { |
| 3917 | builderState.style().setBackfaceVisibility(forwardInheritedValue(builderState.parentStyle().backfaceVisibility())); |
| 3918 | } |
| 3919 | static void applyValueWebkitBackfaceVisibility(BuilderState& builderState, CSSValue& value) |
| 3920 | { |
| 3921 | builderState.style().setBackfaceVisibility(downcast<CSSPrimitiveValue>(value)); |
| 3922 | } |
| 3923 | static void applyInitialWebkitBackgroundClip(BuilderState& builderState) |
| 3924 | { |
| 3925 | // Check for (single-layer) no-op before clearing anything. |
| 3926 | auto& layers = builderState.style().backgroundLayers(); |
| 3927 | if (!layers.next() && (!layers.isClipSet() || layers.clip() == FillLayer::initialFillClip(FillLayerType::Background))) |
| 3928 | return; |
| 3929 | |
| 3930 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 3931 | child->setClip(FillLayer::initialFillClip(FillLayerType::Background)); |
| 3932 | for (child = child->next(); child; child = child->next()) |
| 3933 | child->clearClip(); |
| 3934 | } |
| 3935 | static void applyInheritWebkitBackgroundClip(BuilderState& builderState) |
| 3936 | { |
| 3937 | // Check for no-op before copying anything. |
| 3938 | if (builderState.parentStyle().backgroundLayers() == builderState.style().backgroundLayers()) |
| 3939 | return; |
| 3940 | |
| 3941 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 3942 | FillLayer* previousChild = nullptr; |
| 3943 | for (auto* parent = &builderState.parentStyle().backgroundLayers(); parent && parent->isClipSet(); parent = parent->next()) { |
| 3944 | if (!child) { |
| 3945 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 3946 | child = previousChild->next(); |
| 3947 | } |
| 3948 | child->setClip(parent->clip()); |
| 3949 | previousChild = child; |
| 3950 | child = previousChild->next(); |
| 3951 | } |
| 3952 | for (; child; child = child->next()) |
| 3953 | child->clearClip(); |
| 3954 | } |
| 3955 | static void applyValueWebkitBackgroundClip(BuilderState& builderState, CSSValue& value) |
| 3956 | { |
| 3957 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 3958 | FillLayer* previousChild = nullptr; |
| 3959 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 3960 | // Walk each value and put it into a layer, creating new layers as needed. |
| 3961 | for (auto& item : downcast<CSSValueList>(value)) { |
| 3962 | if (!child) { |
| 3963 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 3964 | child = previousChild->next(); |
| 3965 | } |
| 3966 | builderState.styleMap().mapFillClip(CSSPropertyWebkitBackgroundClip, *child, item); |
| 3967 | previousChild = child; |
| 3968 | child = child->next(); |
| 3969 | } |
| 3970 | } else { |
| 3971 | builderState.styleMap().mapFillClip(CSSPropertyWebkitBackgroundClip, *child, value); |
| 3972 | child = child->next(); |
| 3973 | } |
| 3974 | for (; child; child = child->next()) |
| 3975 | child->clearClip(); |
| 3976 | } |
| 3977 | static void applyInitialWebkitBackgroundComposite(BuilderState& builderState) |
| 3978 | { |
| 3979 | // Check for (single-layer) no-op before clearing anything. |
| 3980 | auto& layers = builderState.style().backgroundLayers(); |
| 3981 | if (!layers.next() && (!layers.isCompositeSet() || layers.composite() == FillLayer::initialFillComposite(FillLayerType::Background))) |
| 3982 | return; |
| 3983 | |
| 3984 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 3985 | child->setComposite(FillLayer::initialFillComposite(FillLayerType::Background)); |
| 3986 | for (child = child->next(); child; child = child->next()) |
| 3987 | child->clearComposite(); |
| 3988 | } |
| 3989 | static void applyInheritWebkitBackgroundComposite(BuilderState& builderState) |
| 3990 | { |
| 3991 | // Check for no-op before copying anything. |
| 3992 | if (builderState.parentStyle().backgroundLayers() == builderState.style().backgroundLayers()) |
| 3993 | return; |
| 3994 | |
| 3995 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 3996 | FillLayer* previousChild = nullptr; |
| 3997 | for (auto* parent = &builderState.parentStyle().backgroundLayers(); parent && parent->isCompositeSet(); parent = parent->next()) { |
| 3998 | if (!child) { |
| 3999 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 4000 | child = previousChild->next(); |
| 4001 | } |
| 4002 | child->setComposite(parent->composite()); |
| 4003 | previousChild = child; |
| 4004 | child = previousChild->next(); |
| 4005 | } |
| 4006 | for (; child; child = child->next()) |
| 4007 | child->clearComposite(); |
| 4008 | } |
| 4009 | static void applyValueWebkitBackgroundComposite(BuilderState& builderState, CSSValue& value) |
| 4010 | { |
| 4011 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 4012 | FillLayer* previousChild = nullptr; |
| 4013 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 4014 | // Walk each value and put it into a layer, creating new layers as needed. |
| 4015 | for (auto& item : downcast<CSSValueList>(value)) { |
| 4016 | if (!child) { |
| 4017 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 4018 | child = previousChild->next(); |
| 4019 | } |
| 4020 | builderState.styleMap().mapFillComposite(CSSPropertyWebkitBackgroundComposite, *child, item); |
| 4021 | previousChild = child; |
| 4022 | child = child->next(); |
| 4023 | } |
| 4024 | } else { |
| 4025 | builderState.styleMap().mapFillComposite(CSSPropertyWebkitBackgroundComposite, *child, value); |
| 4026 | child = child->next(); |
| 4027 | } |
| 4028 | for (; child; child = child->next()) |
| 4029 | child->clearComposite(); |
| 4030 | } |
| 4031 | static void applyInitialWebkitBackgroundOrigin(BuilderState& builderState) |
| 4032 | { |
| 4033 | // Check for (single-layer) no-op before clearing anything. |
| 4034 | auto& layers = builderState.style().backgroundLayers(); |
| 4035 | if (!layers.next() && (!layers.isOriginSet() || layers.origin() == FillLayer::initialFillOrigin(FillLayerType::Background))) |
| 4036 | return; |
| 4037 | |
| 4038 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 4039 | child->setOrigin(FillLayer::initialFillOrigin(FillLayerType::Background)); |
| 4040 | for (child = child->next(); child; child = child->next()) |
| 4041 | child->clearOrigin(); |
| 4042 | } |
| 4043 | static void applyInheritWebkitBackgroundOrigin(BuilderState& builderState) |
| 4044 | { |
| 4045 | // Check for no-op before copying anything. |
| 4046 | if (builderState.parentStyle().backgroundLayers() == builderState.style().backgroundLayers()) |
| 4047 | return; |
| 4048 | |
| 4049 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 4050 | FillLayer* previousChild = nullptr; |
| 4051 | for (auto* parent = &builderState.parentStyle().backgroundLayers(); parent && parent->isOriginSet(); parent = parent->next()) { |
| 4052 | if (!child) { |
| 4053 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 4054 | child = previousChild->next(); |
| 4055 | } |
| 4056 | child->setOrigin(parent->origin()); |
| 4057 | previousChild = child; |
| 4058 | child = previousChild->next(); |
| 4059 | } |
| 4060 | for (; child; child = child->next()) |
| 4061 | child->clearOrigin(); |
| 4062 | } |
| 4063 | static void applyValueWebkitBackgroundOrigin(BuilderState& builderState, CSSValue& value) |
| 4064 | { |
| 4065 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 4066 | FillLayer* previousChild = nullptr; |
| 4067 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 4068 | // Walk each value and put it into a layer, creating new layers as needed. |
| 4069 | for (auto& item : downcast<CSSValueList>(value)) { |
| 4070 | if (!child) { |
| 4071 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 4072 | child = previousChild->next(); |
| 4073 | } |
| 4074 | builderState.styleMap().mapFillOrigin(CSSPropertyWebkitBackgroundOrigin, *child, item); |
| 4075 | previousChild = child; |
| 4076 | child = child->next(); |
| 4077 | } |
| 4078 | } else { |
| 4079 | builderState.styleMap().mapFillOrigin(CSSPropertyWebkitBackgroundOrigin, *child, value); |
| 4080 | child = child->next(); |
| 4081 | } |
| 4082 | for (; child; child = child->next()) |
| 4083 | child->clearOrigin(); |
| 4084 | } |
| 4085 | static void applyInitialWebkitBackgroundSize(BuilderState& builderState) |
| 4086 | { |
| 4087 | // Check for (single-layer) no-op before clearing anything. |
| 4088 | auto& layers = builderState.style().backgroundLayers(); |
| 4089 | if (!layers.next() && (!layers.isSizeSet() || layers.size() == FillLayer::initialFillSize(FillLayerType::Background))) |
| 4090 | return; |
| 4091 | |
| 4092 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 4093 | child->setSize(FillLayer::initialFillSize(FillLayerType::Background)); |
| 4094 | for (child = child->next(); child; child = child->next()) |
| 4095 | child->clearSize(); |
| 4096 | } |
| 4097 | static void applyInheritWebkitBackgroundSize(BuilderState& builderState) |
| 4098 | { |
| 4099 | // Check for no-op before copying anything. |
| 4100 | if (builderState.parentStyle().backgroundLayers() == builderState.style().backgroundLayers()) |
| 4101 | return; |
| 4102 | |
| 4103 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 4104 | FillLayer* previousChild = nullptr; |
| 4105 | for (auto* parent = &builderState.parentStyle().backgroundLayers(); parent && parent->isSizeSet(); parent = parent->next()) { |
| 4106 | if (!child) { |
| 4107 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 4108 | child = previousChild->next(); |
| 4109 | } |
| 4110 | child->setSize(parent->size()); |
| 4111 | previousChild = child; |
| 4112 | child = previousChild->next(); |
| 4113 | } |
| 4114 | for (; child; child = child->next()) |
| 4115 | child->clearSize(); |
| 4116 | } |
| 4117 | static void applyValueWebkitBackgroundSize(BuilderState& builderState, CSSValue& value) |
| 4118 | { |
| 4119 | auto* child = &builderState.style().ensureBackgroundLayers(); |
| 4120 | FillLayer* previousChild = nullptr; |
| 4121 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 4122 | // Walk each value and put it into a layer, creating new layers as needed. |
| 4123 | for (auto& item : downcast<CSSValueList>(value)) { |
| 4124 | if (!child) { |
| 4125 | previousChild->setNext(FillLayer::create(FillLayerType::Background)); |
| 4126 | child = previousChild->next(); |
| 4127 | } |
| 4128 | builderState.styleMap().mapFillSize(CSSPropertyWebkitBackgroundSize, *child, item); |
| 4129 | previousChild = child; |
| 4130 | child = child->next(); |
| 4131 | } |
| 4132 | } else { |
| 4133 | builderState.styleMap().mapFillSize(CSSPropertyWebkitBackgroundSize, *child, value); |
| 4134 | child = child->next(); |
| 4135 | } |
| 4136 | for (; child; child = child->next()) |
| 4137 | child->clearSize(); |
| 4138 | } |
| 4139 | static void applyInitialWebkitBorderFit(BuilderState& builderState) |
| 4140 | { |
| 4141 | builderState.style().setBorderFit(RenderStyle::initialBorderFit()); |
| 4142 | } |
| 4143 | static void applyInheritWebkitBorderFit(BuilderState& builderState) |
| 4144 | { |
| 4145 | builderState.style().setBorderFit(forwardInheritedValue(builderState.parentStyle().borderFit())); |
| 4146 | } |
| 4147 | static void applyValueWebkitBorderFit(BuilderState& builderState, CSSValue& value) |
| 4148 | { |
| 4149 | builderState.style().setBorderFit(downcast<CSSPrimitiveValue>(value)); |
| 4150 | } |
| 4151 | static void applyInitialWebkitBorderHorizontalSpacing(BuilderState& builderState) |
| 4152 | { |
| 4153 | builderState.style().setHorizontalBorderSpacing(RenderStyle::initialHorizontalBorderSpacing()); |
| 4154 | } |
| 4155 | static void applyInheritWebkitBorderHorizontalSpacing(BuilderState& builderState) |
| 4156 | { |
| 4157 | builderState.style().setHorizontalBorderSpacing(forwardInheritedValue(builderState.parentStyle().horizontalBorderSpacing())); |
| 4158 | } |
| 4159 | static void applyValueWebkitBorderHorizontalSpacing(BuilderState& builderState, CSSValue& value) |
| 4160 | { |
| 4161 | builderState.style().setHorizontalBorderSpacing(BuilderConverter::convertComputedLength<float>(builderState, value)); |
| 4162 | } |
| 4163 | static void applyInitialWebkitBorderImage(BuilderState& builderState) |
| 4164 | { |
| 4165 | builderState.style().setBorderImage(RenderStyle::initialNinePieceImage()); |
| 4166 | } |
| 4167 | static void applyInheritWebkitBorderImage(BuilderState& builderState) |
| 4168 | { |
| 4169 | builderState.style().setBorderImage(forwardInheritedValue(builderState.parentStyle().borderImage())); |
| 4170 | } |
| 4171 | static void applyValueWebkitBorderImage(BuilderState& builderState, CSSValue& value) |
| 4172 | { |
| 4173 | builderState.style().setBorderImage(BuilderConverter::convertBorderImage<CSSPropertyWebkitBorderImage>(builderState, value)); |
| 4174 | } |
| 4175 | static void applyInitialWebkitBorderVerticalSpacing(BuilderState& builderState) |
| 4176 | { |
| 4177 | builderState.style().setVerticalBorderSpacing(RenderStyle::initialVerticalBorderSpacing()); |
| 4178 | } |
| 4179 | static void applyInheritWebkitBorderVerticalSpacing(BuilderState& builderState) |
| 4180 | { |
| 4181 | builderState.style().setVerticalBorderSpacing(forwardInheritedValue(builderState.parentStyle().verticalBorderSpacing())); |
| 4182 | } |
| 4183 | static void applyValueWebkitBorderVerticalSpacing(BuilderState& builderState, CSSValue& value) |
| 4184 | { |
| 4185 | builderState.style().setVerticalBorderSpacing(BuilderConverter::convertComputedLength<float>(builderState, value)); |
| 4186 | } |
| 4187 | static void applyInitialWebkitBoxAlign(BuilderState& builderState) |
| 4188 | { |
| 4189 | builderState.style().setBoxAlign(RenderStyle::initialBoxAlign()); |
| 4190 | } |
| 4191 | static void applyInheritWebkitBoxAlign(BuilderState& builderState) |
| 4192 | { |
| 4193 | builderState.style().setBoxAlign(forwardInheritedValue(builderState.parentStyle().boxAlign())); |
| 4194 | } |
| 4195 | static void applyValueWebkitBoxAlign(BuilderState& builderState, CSSValue& value) |
| 4196 | { |
| 4197 | builderState.style().setBoxAlign(downcast<CSSPrimitiveValue>(value)); |
| 4198 | } |
| 4199 | static void applyInitialWebkitBoxDecorationBreak(BuilderState& builderState) |
| 4200 | { |
| 4201 | builderState.style().setBoxDecorationBreak(RenderStyle::initialBoxDecorationBreak()); |
| 4202 | } |
| 4203 | static void applyInheritWebkitBoxDecorationBreak(BuilderState& builderState) |
| 4204 | { |
| 4205 | builderState.style().setBoxDecorationBreak(forwardInheritedValue(builderState.parentStyle().boxDecorationBreak())); |
| 4206 | } |
| 4207 | static void applyValueWebkitBoxDecorationBreak(BuilderState& builderState, CSSValue& value) |
| 4208 | { |
| 4209 | builderState.style().setBoxDecorationBreak(downcast<CSSPrimitiveValue>(value)); |
| 4210 | } |
| 4211 | static void applyInitialWebkitBoxDirection(BuilderState& builderState) |
| 4212 | { |
| 4213 | builderState.style().setBoxDirection(RenderStyle::initialBoxDirection()); |
| 4214 | } |
| 4215 | static void applyInheritWebkitBoxDirection(BuilderState& builderState) |
| 4216 | { |
| 4217 | builderState.style().setBoxDirection(forwardInheritedValue(builderState.parentStyle().boxDirection())); |
| 4218 | } |
| 4219 | static void applyValueWebkitBoxDirection(BuilderState& builderState, CSSValue& value) |
| 4220 | { |
| 4221 | builderState.style().setBoxDirection(downcast<CSSPrimitiveValue>(value)); |
| 4222 | } |
| 4223 | static void applyInitialWebkitBoxFlex(BuilderState& builderState) |
| 4224 | { |
| 4225 | builderState.style().setBoxFlex(RenderStyle::initialBoxFlex()); |
| 4226 | } |
| 4227 | static void applyInheritWebkitBoxFlex(BuilderState& builderState) |
| 4228 | { |
| 4229 | builderState.style().setBoxFlex(forwardInheritedValue(builderState.parentStyle().boxFlex())); |
| 4230 | } |
| 4231 | static void applyValueWebkitBoxFlex(BuilderState& builderState, CSSValue& value) |
| 4232 | { |
| 4233 | builderState.style().setBoxFlex(downcast<CSSPrimitiveValue>(value)); |
| 4234 | } |
| 4235 | static void applyInitialWebkitBoxFlexGroup(BuilderState& builderState) |
| 4236 | { |
| 4237 | builderState.style().setBoxFlexGroup(RenderStyle::initialBoxFlexGroup()); |
| 4238 | } |
| 4239 | static void applyInheritWebkitBoxFlexGroup(BuilderState& builderState) |
| 4240 | { |
| 4241 | builderState.style().setBoxFlexGroup(forwardInheritedValue(builderState.parentStyle().boxFlexGroup())); |
| 4242 | } |
| 4243 | static void applyValueWebkitBoxFlexGroup(BuilderState& builderState, CSSValue& value) |
| 4244 | { |
| 4245 | builderState.style().setBoxFlexGroup(downcast<CSSPrimitiveValue>(value)); |
| 4246 | } |
| 4247 | static void applyInitialWebkitBoxLines(BuilderState& builderState) |
| 4248 | { |
| 4249 | builderState.style().setBoxLines(RenderStyle::initialBoxLines()); |
| 4250 | } |
| 4251 | static void applyInheritWebkitBoxLines(BuilderState& builderState) |
| 4252 | { |
| 4253 | builderState.style().setBoxLines(forwardInheritedValue(builderState.parentStyle().boxLines())); |
| 4254 | } |
| 4255 | static void applyValueWebkitBoxLines(BuilderState& builderState, CSSValue& value) |
| 4256 | { |
| 4257 | builderState.style().setBoxLines(downcast<CSSPrimitiveValue>(value)); |
| 4258 | } |
| 4259 | static void applyInitialWebkitBoxOrdinalGroup(BuilderState& builderState) |
| 4260 | { |
| 4261 | builderState.style().setBoxOrdinalGroup(RenderStyle::initialBoxOrdinalGroup()); |
| 4262 | } |
| 4263 | static void applyInheritWebkitBoxOrdinalGroup(BuilderState& builderState) |
| 4264 | { |
| 4265 | builderState.style().setBoxOrdinalGroup(forwardInheritedValue(builderState.parentStyle().boxOrdinalGroup())); |
| 4266 | } |
| 4267 | static void applyValueWebkitBoxOrdinalGroup(BuilderState& builderState, CSSValue& value) |
| 4268 | { |
| 4269 | builderState.style().setBoxOrdinalGroup(downcast<CSSPrimitiveValue>(value)); |
| 4270 | } |
| 4271 | static void applyInitialWebkitBoxOrient(BuilderState& builderState) |
| 4272 | { |
| 4273 | builderState.style().setBoxOrient(RenderStyle::initialBoxOrient()); |
| 4274 | } |
| 4275 | static void applyInheritWebkitBoxOrient(BuilderState& builderState) |
| 4276 | { |
| 4277 | builderState.style().setBoxOrient(forwardInheritedValue(builderState.parentStyle().boxOrient())); |
| 4278 | } |
| 4279 | static void applyValueWebkitBoxOrient(BuilderState& builderState, CSSValue& value) |
| 4280 | { |
| 4281 | builderState.style().setBoxOrient(downcast<CSSPrimitiveValue>(value)); |
| 4282 | } |
| 4283 | static void applyInitialWebkitBoxPack(BuilderState& builderState) |
| 4284 | { |
| 4285 | builderState.style().setBoxPack(RenderStyle::initialBoxPack()); |
| 4286 | } |
| 4287 | static void applyInheritWebkitBoxPack(BuilderState& builderState) |
| 4288 | { |
| 4289 | builderState.style().setBoxPack(forwardInheritedValue(builderState.parentStyle().boxPack())); |
| 4290 | } |
| 4291 | static void applyValueWebkitBoxPack(BuilderState& builderState, CSSValue& value) |
| 4292 | { |
| 4293 | builderState.style().setBoxPack(downcast<CSSPrimitiveValue>(value)); |
| 4294 | } |
| 4295 | static void applyInitialWebkitBoxReflect(BuilderState& builderState) |
| 4296 | { |
| 4297 | builderState.style().setBoxReflect(RenderStyle::initialBoxReflect()); |
| 4298 | } |
| 4299 | static void applyInheritWebkitBoxReflect(BuilderState& builderState) |
| 4300 | { |
| 4301 | builderState.style().setBoxReflect(forwardInheritedValue(builderState.parentStyle().boxReflect())); |
| 4302 | } |
| 4303 | static void applyValueWebkitBoxReflect(BuilderState& builderState, CSSValue& value) |
| 4304 | { |
| 4305 | builderState.style().setBoxReflect(BuilderConverter::convertReflection(builderState, value)); |
| 4306 | } |
| 4307 | static void applyInitialWebkitColumnAxis(BuilderState& builderState) |
| 4308 | { |
| 4309 | builderState.style().setColumnAxis(RenderStyle::initialColumnAxis()); |
| 4310 | } |
| 4311 | static void applyInheritWebkitColumnAxis(BuilderState& builderState) |
| 4312 | { |
| 4313 | builderState.style().setColumnAxis(forwardInheritedValue(builderState.parentStyle().columnAxis())); |
| 4314 | } |
| 4315 | static void applyValueWebkitColumnAxis(BuilderState& builderState, CSSValue& value) |
| 4316 | { |
| 4317 | builderState.style().setColumnAxis(downcast<CSSPrimitiveValue>(value)); |
| 4318 | } |
| 4319 | static void applyInitialWebkitColumnProgression(BuilderState& builderState) |
| 4320 | { |
| 4321 | builderState.style().setColumnProgression(RenderStyle::initialColumnProgression()); |
| 4322 | } |
| 4323 | static void applyInheritWebkitColumnProgression(BuilderState& builderState) |
| 4324 | { |
| 4325 | builderState.style().setColumnProgression(forwardInheritedValue(builderState.parentStyle().columnProgression())); |
| 4326 | } |
| 4327 | static void applyValueWebkitColumnProgression(BuilderState& builderState, CSSValue& value) |
| 4328 | { |
| 4329 | builderState.style().setColumnProgression(downcast<CSSPrimitiveValue>(value)); |
| 4330 | } |
| 4331 | static void applyInitialWebkitCursorVisibility(BuilderState& builderState) |
| 4332 | { |
| 4333 | builderState.style().setCursorVisibility(RenderStyle::initialCursorVisibility()); |
| 4334 | } |
| 4335 | static void applyInheritWebkitCursorVisibility(BuilderState& builderState) |
| 4336 | { |
| 4337 | builderState.style().setCursorVisibility(forwardInheritedValue(builderState.parentStyle().cursorVisibility())); |
| 4338 | } |
| 4339 | static void applyValueWebkitCursorVisibility(BuilderState& builderState, CSSValue& value) |
| 4340 | { |
| 4341 | builderState.style().setCursorVisibility(downcast<CSSPrimitiveValue>(value)); |
| 4342 | } |
| 4343 | static void applyInitialWebkitHyphenateCharacter(BuilderState& builderState) |
| 4344 | { |
| 4345 | builderState.style().setHyphenationString(RenderStyle::initialHyphenationString()); |
| 4346 | } |
| 4347 | static void applyInheritWebkitHyphenateCharacter(BuilderState& builderState) |
| 4348 | { |
| 4349 | builderState.style().setHyphenationString(forwardInheritedValue(builderState.parentStyle().hyphenationString())); |
| 4350 | } |
| 4351 | static void applyValueWebkitHyphenateCharacter(BuilderState& builderState, CSSValue& value) |
| 4352 | { |
| 4353 | builderState.style().setHyphenationString(BuilderConverter::convertStringOrAuto(builderState, value)); |
| 4354 | } |
| 4355 | static void applyInitialWebkitHyphenateLimitAfter(BuilderState& builderState) |
| 4356 | { |
| 4357 | builderState.style().setHyphenationLimitAfter(RenderStyle::initialHyphenationLimitAfter()); |
| 4358 | } |
| 4359 | static void applyInheritWebkitHyphenateLimitAfter(BuilderState& builderState) |
| 4360 | { |
| 4361 | builderState.style().setHyphenationLimitAfter(forwardInheritedValue(builderState.parentStyle().hyphenationLimitAfter())); |
| 4362 | } |
| 4363 | static void applyValueWebkitHyphenateLimitAfter(BuilderState& builderState, CSSValue& value) |
| 4364 | { |
| 4365 | builderState.style().setHyphenationLimitAfter(BuilderConverter::convertNumberOrAuto<short>(builderState, value)); |
| 4366 | } |
| 4367 | static void applyInitialWebkitHyphenateLimitBefore(BuilderState& builderState) |
| 4368 | { |
| 4369 | builderState.style().setHyphenationLimitBefore(RenderStyle::initialHyphenationLimitBefore()); |
| 4370 | } |
| 4371 | static void applyInheritWebkitHyphenateLimitBefore(BuilderState& builderState) |
| 4372 | { |
| 4373 | builderState.style().setHyphenationLimitBefore(forwardInheritedValue(builderState.parentStyle().hyphenationLimitBefore())); |
| 4374 | } |
| 4375 | static void applyValueWebkitHyphenateLimitBefore(BuilderState& builderState, CSSValue& value) |
| 4376 | { |
| 4377 | builderState.style().setHyphenationLimitBefore(BuilderConverter::convertNumberOrAuto<short>(builderState, value)); |
| 4378 | } |
| 4379 | static void applyInitialWebkitHyphenateLimitLines(BuilderState& builderState) |
| 4380 | { |
| 4381 | builderState.style().setHyphenationLimitLines(RenderStyle::initialHyphenationLimitLines()); |
| 4382 | } |
| 4383 | static void applyInheritWebkitHyphenateLimitLines(BuilderState& builderState) |
| 4384 | { |
| 4385 | builderState.style().setHyphenationLimitLines(forwardInheritedValue(builderState.parentStyle().hyphenationLimitLines())); |
| 4386 | } |
| 4387 | static void applyValueWebkitHyphenateLimitLines(BuilderState& builderState, CSSValue& value) |
| 4388 | { |
| 4389 | builderState.style().setHyphenationLimitLines(BuilderConverter::convertWebkitHyphenateLimitLines(builderState, value)); |
| 4390 | } |
| 4391 | static void applyInitialWebkitHyphens(BuilderState& builderState) |
| 4392 | { |
| 4393 | builderState.style().setHyphens(RenderStyle::initialHyphens()); |
| 4394 | } |
| 4395 | static void applyInheritWebkitHyphens(BuilderState& builderState) |
| 4396 | { |
| 4397 | builderState.style().setHyphens(forwardInheritedValue(builderState.parentStyle().hyphens())); |
| 4398 | } |
| 4399 | static void applyValueWebkitHyphens(BuilderState& builderState, CSSValue& value) |
| 4400 | { |
| 4401 | builderState.style().setHyphens(downcast<CSSPrimitiveValue>(value)); |
| 4402 | } |
| 4403 | static void applyInitialWebkitInitialLetter(BuilderState& builderState) |
| 4404 | { |
| 4405 | builderState.style().setInitialLetter(RenderStyle::initialInitialLetter()); |
| 4406 | } |
| 4407 | static void applyInheritWebkitInitialLetter(BuilderState& builderState) |
| 4408 | { |
| 4409 | builderState.style().setInitialLetter(forwardInheritedValue(builderState.parentStyle().initialLetter())); |
| 4410 | } |
| 4411 | static void applyValueWebkitInitialLetter(BuilderState& builderState, CSSValue& value) |
| 4412 | { |
| 4413 | builderState.style().setInitialLetter(BuilderConverter::convertInitialLetter(builderState, value)); |
| 4414 | } |
| 4415 | static void applyInitialWebkitLineAlign(BuilderState& builderState) |
| 4416 | { |
| 4417 | builderState.style().setLineAlign(RenderStyle::initialLineAlign()); |
| 4418 | } |
| 4419 | static void applyInheritWebkitLineAlign(BuilderState& builderState) |
| 4420 | { |
| 4421 | builderState.style().setLineAlign(forwardInheritedValue(builderState.parentStyle().lineAlign())); |
| 4422 | } |
| 4423 | static void applyValueWebkitLineAlign(BuilderState& builderState, CSSValue& value) |
| 4424 | { |
| 4425 | builderState.style().setLineAlign(downcast<CSSPrimitiveValue>(value)); |
| 4426 | } |
| 4427 | static void applyInitialWebkitLineBoxContain(BuilderState& builderState) |
| 4428 | { |
| 4429 | builderState.style().setLineBoxContain(RenderStyle::initialLineBoxContain()); |
| 4430 | } |
| 4431 | static void applyInheritWebkitLineBoxContain(BuilderState& builderState) |
| 4432 | { |
| 4433 | builderState.style().setLineBoxContain(forwardInheritedValue(builderState.parentStyle().lineBoxContain())); |
| 4434 | } |
| 4435 | static void applyValueWebkitLineBoxContain(BuilderState& builderState, CSSValue& value) |
| 4436 | { |
| 4437 | builderState.style().setLineBoxContain(BuilderConverter::convertLineBoxContain(builderState, value)); |
| 4438 | } |
| 4439 | static void applyInitialWebkitLineClamp(BuilderState& builderState) |
| 4440 | { |
| 4441 | builderState.style().setLineClamp(RenderStyle::initialLineClamp()); |
| 4442 | } |
| 4443 | static void applyInheritWebkitLineClamp(BuilderState& builderState) |
| 4444 | { |
| 4445 | builderState.style().setLineClamp(forwardInheritedValue(builderState.parentStyle().lineClamp())); |
| 4446 | } |
| 4447 | static void applyValueWebkitLineClamp(BuilderState& builderState, CSSValue& value) |
| 4448 | { |
| 4449 | builderState.style().setLineClamp(downcast<CSSPrimitiveValue>(value)); |
| 4450 | } |
| 4451 | static void applyInitialWebkitLineGrid(BuilderState& builderState) |
| 4452 | { |
| 4453 | builderState.style().setLineGrid(RenderStyle::initialLineGrid()); |
| 4454 | } |
| 4455 | static void applyInheritWebkitLineGrid(BuilderState& builderState) |
| 4456 | { |
| 4457 | builderState.style().setLineGrid(forwardInheritedValue(builderState.parentStyle().lineGrid())); |
| 4458 | } |
| 4459 | static void applyValueWebkitLineGrid(BuilderState& builderState, CSSValue& value) |
| 4460 | { |
| 4461 | builderState.style().setLineGrid(BuilderConverter::convertStringOrNone(builderState, value)); |
| 4462 | } |
| 4463 | static void applyInitialWebkitLineSnap(BuilderState& builderState) |
| 4464 | { |
| 4465 | builderState.style().setLineSnap(RenderStyle::initialLineSnap()); |
| 4466 | } |
| 4467 | static void applyInheritWebkitLineSnap(BuilderState& builderState) |
| 4468 | { |
| 4469 | builderState.style().setLineSnap(forwardInheritedValue(builderState.parentStyle().lineSnap())); |
| 4470 | } |
| 4471 | static void applyValueWebkitLineSnap(BuilderState& builderState, CSSValue& value) |
| 4472 | { |
| 4473 | builderState.style().setLineSnap(downcast<CSSPrimitiveValue>(value)); |
| 4474 | } |
| 4475 | static void applyInitialWebkitMarginAfterCollapse(BuilderState& builderState) |
| 4476 | { |
| 4477 | builderState.style().setMarginAfterCollapse(RenderStyle::initialMarginAfterCollapse()); |
| 4478 | } |
| 4479 | static void applyInheritWebkitMarginAfterCollapse(BuilderState& builderState) |
| 4480 | { |
| 4481 | builderState.style().setMarginAfterCollapse(forwardInheritedValue(builderState.parentStyle().marginAfterCollapse())); |
| 4482 | } |
| 4483 | static void applyValueWebkitMarginAfterCollapse(BuilderState& builderState, CSSValue& value) |
| 4484 | { |
| 4485 | builderState.style().setMarginAfterCollapse(downcast<CSSPrimitiveValue>(value)); |
| 4486 | } |
| 4487 | static void applyInitialWebkitMarginBeforeCollapse(BuilderState& builderState) |
| 4488 | { |
| 4489 | builderState.style().setMarginBeforeCollapse(RenderStyle::initialMarginBeforeCollapse()); |
| 4490 | } |
| 4491 | static void applyInheritWebkitMarginBeforeCollapse(BuilderState& builderState) |
| 4492 | { |
| 4493 | builderState.style().setMarginBeforeCollapse(forwardInheritedValue(builderState.parentStyle().marginBeforeCollapse())); |
| 4494 | } |
| 4495 | static void applyValueWebkitMarginBeforeCollapse(BuilderState& builderState, CSSValue& value) |
| 4496 | { |
| 4497 | builderState.style().setMarginBeforeCollapse(downcast<CSSPrimitiveValue>(value)); |
| 4498 | } |
| 4499 | static void applyInitialWebkitMarginBottomCollapse(BuilderState& builderState) |
| 4500 | { |
| 4501 | builderState.style().setMarginAfterCollapse(RenderStyle::initialMarginAfterCollapse()); |
| 4502 | } |
| 4503 | static void applyInheritWebkitMarginBottomCollapse(BuilderState& builderState) |
| 4504 | { |
| 4505 | builderState.style().setMarginAfterCollapse(forwardInheritedValue(builderState.parentStyle().marginAfterCollapse())); |
| 4506 | } |
| 4507 | static void applyValueWebkitMarginBottomCollapse(BuilderState& builderState, CSSValue& value) |
| 4508 | { |
| 4509 | builderState.style().setMarginAfterCollapse(downcast<CSSPrimitiveValue>(value)); |
| 4510 | } |
| 4511 | static void applyInitialWebkitMarginTopCollapse(BuilderState& builderState) |
| 4512 | { |
| 4513 | builderState.style().setMarginBeforeCollapse(RenderStyle::initialMarginBeforeCollapse()); |
| 4514 | } |
| 4515 | static void applyInheritWebkitMarginTopCollapse(BuilderState& builderState) |
| 4516 | { |
| 4517 | builderState.style().setMarginBeforeCollapse(forwardInheritedValue(builderState.parentStyle().marginBeforeCollapse())); |
| 4518 | } |
| 4519 | static void applyValueWebkitMarginTopCollapse(BuilderState& builderState, CSSValue& value) |
| 4520 | { |
| 4521 | builderState.style().setMarginBeforeCollapse(downcast<CSSPrimitiveValue>(value)); |
| 4522 | } |
| 4523 | static void applyInitialWebkitMarqueeDirection(BuilderState& builderState) |
| 4524 | { |
| 4525 | builderState.style().setMarqueeDirection(RenderStyle::initialMarqueeDirection()); |
| 4526 | } |
| 4527 | static void applyInheritWebkitMarqueeDirection(BuilderState& builderState) |
| 4528 | { |
| 4529 | builderState.style().setMarqueeDirection(forwardInheritedValue(builderState.parentStyle().marqueeDirection())); |
| 4530 | } |
| 4531 | static void applyValueWebkitMarqueeDirection(BuilderState& builderState, CSSValue& value) |
| 4532 | { |
| 4533 | builderState.style().setMarqueeDirection(downcast<CSSPrimitiveValue>(value)); |
| 4534 | } |
| 4535 | static void applyInitialWebkitMarqueeIncrement(BuilderState& builderState) |
| 4536 | { |
| 4537 | builderState.style().setMarqueeIncrement(RenderStyle::initialMarqueeIncrement()); |
| 4538 | } |
| 4539 | static void applyInheritWebkitMarqueeIncrement(BuilderState& builderState) |
| 4540 | { |
| 4541 | builderState.style().setMarqueeIncrement(forwardInheritedValue(builderState.parentStyle().marqueeIncrement())); |
| 4542 | } |
| 4543 | static void applyValueWebkitMarqueeIncrement(BuilderState& builderState, CSSValue& value) |
| 4544 | { |
| 4545 | auto convertedValue = BuilderConverter::convertMarqueeIncrement(builderState, value); |
| 4546 | if (convertedValue) |
| 4547 | builderState.style().setMarqueeIncrement(WTFMove(convertedValue.value())); |
| 4548 | } |
| 4549 | static void applyInitialWebkitMarqueeRepetition(BuilderState& builderState) |
| 4550 | { |
| 4551 | builderState.style().setMarqueeLoopCount(RenderStyle::initialMarqueeLoopCount()); |
| 4552 | } |
| 4553 | static void applyInheritWebkitMarqueeRepetition(BuilderState& builderState) |
| 4554 | { |
| 4555 | builderState.style().setMarqueeLoopCount(forwardInheritedValue(builderState.parentStyle().marqueeLoopCount())); |
| 4556 | } |
| 4557 | static void applyValueWebkitMarqueeRepetition(BuilderState& builderState, CSSValue& value) |
| 4558 | { |
| 4559 | builderState.style().setMarqueeLoopCount(BuilderConverter::convertMarqueeRepetition(builderState, value)); |
| 4560 | } |
| 4561 | static void applyInitialWebkitMarqueeSpeed(BuilderState& builderState) |
| 4562 | { |
| 4563 | builderState.style().setMarqueeSpeed(RenderStyle::initialMarqueeSpeed()); |
| 4564 | } |
| 4565 | static void applyInheritWebkitMarqueeSpeed(BuilderState& builderState) |
| 4566 | { |
| 4567 | builderState.style().setMarqueeSpeed(forwardInheritedValue(builderState.parentStyle().marqueeSpeed())); |
| 4568 | } |
| 4569 | static void applyValueWebkitMarqueeSpeed(BuilderState& builderState, CSSValue& value) |
| 4570 | { |
| 4571 | builderState.style().setMarqueeSpeed(BuilderConverter::convertMarqueeSpeed(builderState, value)); |
| 4572 | } |
| 4573 | static void applyInitialWebkitMarqueeStyle(BuilderState& builderState) |
| 4574 | { |
| 4575 | builderState.style().setMarqueeBehavior(RenderStyle::initialMarqueeBehavior()); |
| 4576 | } |
| 4577 | static void applyInheritWebkitMarqueeStyle(BuilderState& builderState) |
| 4578 | { |
| 4579 | builderState.style().setMarqueeBehavior(forwardInheritedValue(builderState.parentStyle().marqueeBehavior())); |
| 4580 | } |
| 4581 | static void applyValueWebkitMarqueeStyle(BuilderState& builderState, CSSValue& value) |
| 4582 | { |
| 4583 | builderState.style().setMarqueeBehavior(downcast<CSSPrimitiveValue>(value)); |
| 4584 | } |
| 4585 | static void applyInitialWebkitMaskBoxImage(BuilderState& builderState) |
| 4586 | { |
| 4587 | builderState.style().setMaskBoxImage(RenderStyle::initialNinePieceImage()); |
| 4588 | } |
| 4589 | static void applyInheritWebkitMaskBoxImage(BuilderState& builderState) |
| 4590 | { |
| 4591 | builderState.style().setMaskBoxImage(forwardInheritedValue(builderState.parentStyle().maskBoxImage())); |
| 4592 | } |
| 4593 | static void applyValueWebkitMaskBoxImage(BuilderState& builderState, CSSValue& value) |
| 4594 | { |
| 4595 | builderState.style().setMaskBoxImage(BuilderConverter::convertBorderMask<CSSPropertyWebkitMaskBoxImage>(builderState, value)); |
| 4596 | } |
| 4597 | static void applyInitialWebkitMaskBoxImageSource(BuilderState& builderState) |
| 4598 | { |
| 4599 | builderState.style().setMaskBoxImageSource(RenderStyle::initialMaskBoxImageSource()); |
| 4600 | } |
| 4601 | static void applyInheritWebkitMaskBoxImageSource(BuilderState& builderState) |
| 4602 | { |
| 4603 | builderState.style().setMaskBoxImageSource(forwardInheritedValue(builderState.parentStyle().maskBoxImageSource())); |
| 4604 | } |
| 4605 | static void applyValueWebkitMaskBoxImageSource(BuilderState& builderState, CSSValue& value) |
| 4606 | { |
| 4607 | builderState.style().setMaskBoxImageSource(BuilderConverter::convertStyleImage<CSSPropertyWebkitMaskBoxImageSource>(builderState, value)); |
| 4608 | } |
| 4609 | static void applyInitialWebkitMaskClip(BuilderState& builderState) |
| 4610 | { |
| 4611 | // Check for (single-layer) no-op before clearing anything. |
| 4612 | auto& layers = builderState.style().maskLayers(); |
| 4613 | if (!layers.next() && (!layers.isClipSet() || layers.clip() == FillLayer::initialFillClip(FillLayerType::Mask))) |
| 4614 | return; |
| 4615 | |
| 4616 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4617 | child->setClip(FillLayer::initialFillClip(FillLayerType::Mask)); |
| 4618 | for (child = child->next(); child; child = child->next()) |
| 4619 | child->clearClip(); |
| 4620 | } |
| 4621 | static void applyInheritWebkitMaskClip(BuilderState& builderState) |
| 4622 | { |
| 4623 | // Check for no-op before copying anything. |
| 4624 | if (builderState.parentStyle().maskLayers() == builderState.style().maskLayers()) |
| 4625 | return; |
| 4626 | |
| 4627 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4628 | FillLayer* previousChild = nullptr; |
| 4629 | for (auto* parent = &builderState.parentStyle().maskLayers(); parent && parent->isClipSet(); parent = parent->next()) { |
| 4630 | if (!child) { |
| 4631 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 4632 | child = previousChild->next(); |
| 4633 | } |
| 4634 | child->setClip(parent->clip()); |
| 4635 | previousChild = child; |
| 4636 | child = previousChild->next(); |
| 4637 | } |
| 4638 | for (; child; child = child->next()) |
| 4639 | child->clearClip(); |
| 4640 | } |
| 4641 | static void applyValueWebkitMaskClip(BuilderState& builderState, CSSValue& value) |
| 4642 | { |
| 4643 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4644 | FillLayer* previousChild = nullptr; |
| 4645 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 4646 | // Walk each value and put it into a layer, creating new layers as needed. |
| 4647 | for (auto& item : downcast<CSSValueList>(value)) { |
| 4648 | if (!child) { |
| 4649 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 4650 | child = previousChild->next(); |
| 4651 | } |
| 4652 | builderState.styleMap().mapFillClip(CSSPropertyWebkitMaskClip, *child, item); |
| 4653 | previousChild = child; |
| 4654 | child = child->next(); |
| 4655 | } |
| 4656 | } else { |
| 4657 | builderState.styleMap().mapFillClip(CSSPropertyWebkitMaskClip, *child, value); |
| 4658 | child = child->next(); |
| 4659 | } |
| 4660 | for (; child; child = child->next()) |
| 4661 | child->clearClip(); |
| 4662 | } |
| 4663 | static void applyInitialWebkitMaskComposite(BuilderState& builderState) |
| 4664 | { |
| 4665 | // Check for (single-layer) no-op before clearing anything. |
| 4666 | auto& layers = builderState.style().maskLayers(); |
| 4667 | if (!layers.next() && (!layers.isCompositeSet() || layers.composite() == FillLayer::initialFillComposite(FillLayerType::Mask))) |
| 4668 | return; |
| 4669 | |
| 4670 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4671 | child->setComposite(FillLayer::initialFillComposite(FillLayerType::Mask)); |
| 4672 | for (child = child->next(); child; child = child->next()) |
| 4673 | child->clearComposite(); |
| 4674 | } |
| 4675 | static void applyInheritWebkitMaskComposite(BuilderState& builderState) |
| 4676 | { |
| 4677 | // Check for no-op before copying anything. |
| 4678 | if (builderState.parentStyle().maskLayers() == builderState.style().maskLayers()) |
| 4679 | return; |
| 4680 | |
| 4681 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4682 | FillLayer* previousChild = nullptr; |
| 4683 | for (auto* parent = &builderState.parentStyle().maskLayers(); parent && parent->isCompositeSet(); parent = parent->next()) { |
| 4684 | if (!child) { |
| 4685 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 4686 | child = previousChild->next(); |
| 4687 | } |
| 4688 | child->setComposite(parent->composite()); |
| 4689 | previousChild = child; |
| 4690 | child = previousChild->next(); |
| 4691 | } |
| 4692 | for (; child; child = child->next()) |
| 4693 | child->clearComposite(); |
| 4694 | } |
| 4695 | static void applyValueWebkitMaskComposite(BuilderState& builderState, CSSValue& value) |
| 4696 | { |
| 4697 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4698 | FillLayer* previousChild = nullptr; |
| 4699 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 4700 | // Walk each value and put it into a layer, creating new layers as needed. |
| 4701 | for (auto& item : downcast<CSSValueList>(value)) { |
| 4702 | if (!child) { |
| 4703 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 4704 | child = previousChild->next(); |
| 4705 | } |
| 4706 | builderState.styleMap().mapFillComposite(CSSPropertyWebkitMaskComposite, *child, item); |
| 4707 | previousChild = child; |
| 4708 | child = child->next(); |
| 4709 | } |
| 4710 | } else { |
| 4711 | builderState.styleMap().mapFillComposite(CSSPropertyWebkitMaskComposite, *child, value); |
| 4712 | child = child->next(); |
| 4713 | } |
| 4714 | for (; child; child = child->next()) |
| 4715 | child->clearComposite(); |
| 4716 | } |
| 4717 | static void applyInitialWebkitMaskImage(BuilderState& builderState) |
| 4718 | { |
| 4719 | // Check for (single-layer) no-op before clearing anything. |
| 4720 | auto& layers = builderState.style().maskLayers(); |
| 4721 | if (!layers.next() && (!layers.isImageSet() || layers.image() == FillLayer::initialFillImage(FillLayerType::Mask))) |
| 4722 | return; |
| 4723 | |
| 4724 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4725 | child->setImage(FillLayer::initialFillImage(FillLayerType::Mask)); |
| 4726 | for (child = child->next(); child; child = child->next()) |
| 4727 | child->clearImage(); |
| 4728 | } |
| 4729 | static void applyInheritWebkitMaskImage(BuilderState& builderState) |
| 4730 | { |
| 4731 | // Check for no-op before copying anything. |
| 4732 | if (builderState.parentStyle().maskLayers() == builderState.style().maskLayers()) |
| 4733 | return; |
| 4734 | |
| 4735 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4736 | FillLayer* previousChild = nullptr; |
| 4737 | for (auto* parent = &builderState.parentStyle().maskLayers(); parent && parent->isImageSet(); parent = parent->next()) { |
| 4738 | if (!child) { |
| 4739 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 4740 | child = previousChild->next(); |
| 4741 | } |
| 4742 | child->setImage(parent->image()); |
| 4743 | previousChild = child; |
| 4744 | child = previousChild->next(); |
| 4745 | } |
| 4746 | for (; child; child = child->next()) |
| 4747 | child->clearImage(); |
| 4748 | } |
| 4749 | static void applyValueWebkitMaskImage(BuilderState& builderState, CSSValue& value) |
| 4750 | { |
| 4751 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4752 | FillLayer* previousChild = nullptr; |
| 4753 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 4754 | // Walk each value and put it into a layer, creating new layers as needed. |
| 4755 | for (auto& item : downcast<CSSValueList>(value)) { |
| 4756 | if (!child) { |
| 4757 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 4758 | child = previousChild->next(); |
| 4759 | } |
| 4760 | builderState.styleMap().mapFillImage(CSSPropertyWebkitMaskImage, *child, item); |
| 4761 | previousChild = child; |
| 4762 | child = child->next(); |
| 4763 | } |
| 4764 | } else { |
| 4765 | builderState.styleMap().mapFillImage(CSSPropertyWebkitMaskImage, *child, value); |
| 4766 | child = child->next(); |
| 4767 | } |
| 4768 | for (; child; child = child->next()) |
| 4769 | child->clearImage(); |
| 4770 | } |
| 4771 | static void applyInitialWebkitMaskOrigin(BuilderState& builderState) |
| 4772 | { |
| 4773 | // Check for (single-layer) no-op before clearing anything. |
| 4774 | auto& layers = builderState.style().maskLayers(); |
| 4775 | if (!layers.next() && (!layers.isOriginSet() || layers.origin() == FillLayer::initialFillOrigin(FillLayerType::Mask))) |
| 4776 | return; |
| 4777 | |
| 4778 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4779 | child->setOrigin(FillLayer::initialFillOrigin(FillLayerType::Mask)); |
| 4780 | for (child = child->next(); child; child = child->next()) |
| 4781 | child->clearOrigin(); |
| 4782 | } |
| 4783 | static void applyInheritWebkitMaskOrigin(BuilderState& builderState) |
| 4784 | { |
| 4785 | // Check for no-op before copying anything. |
| 4786 | if (builderState.parentStyle().maskLayers() == builderState.style().maskLayers()) |
| 4787 | return; |
| 4788 | |
| 4789 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4790 | FillLayer* previousChild = nullptr; |
| 4791 | for (auto* parent = &builderState.parentStyle().maskLayers(); parent && parent->isOriginSet(); parent = parent->next()) { |
| 4792 | if (!child) { |
| 4793 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 4794 | child = previousChild->next(); |
| 4795 | } |
| 4796 | child->setOrigin(parent->origin()); |
| 4797 | previousChild = child; |
| 4798 | child = previousChild->next(); |
| 4799 | } |
| 4800 | for (; child; child = child->next()) |
| 4801 | child->clearOrigin(); |
| 4802 | } |
| 4803 | static void applyValueWebkitMaskOrigin(BuilderState& builderState, CSSValue& value) |
| 4804 | { |
| 4805 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4806 | FillLayer* previousChild = nullptr; |
| 4807 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 4808 | // Walk each value and put it into a layer, creating new layers as needed. |
| 4809 | for (auto& item : downcast<CSSValueList>(value)) { |
| 4810 | if (!child) { |
| 4811 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 4812 | child = previousChild->next(); |
| 4813 | } |
| 4814 | builderState.styleMap().mapFillOrigin(CSSPropertyWebkitMaskOrigin, *child, item); |
| 4815 | previousChild = child; |
| 4816 | child = child->next(); |
| 4817 | } |
| 4818 | } else { |
| 4819 | builderState.styleMap().mapFillOrigin(CSSPropertyWebkitMaskOrigin, *child, value); |
| 4820 | child = child->next(); |
| 4821 | } |
| 4822 | for (; child; child = child->next()) |
| 4823 | child->clearOrigin(); |
| 4824 | } |
| 4825 | static void applyInitialWebkitMaskPositionX(BuilderState& builderState) |
| 4826 | { |
| 4827 | // Check for (single-layer) no-op before clearing anything. |
| 4828 | auto& layers = builderState.style().maskLayers(); |
| 4829 | if (!layers.next() && (!layers.isXPositionSet() || layers.xPosition() == FillLayer::initialFillXPosition(FillLayerType::Mask))) |
| 4830 | return; |
| 4831 | |
| 4832 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4833 | child->setXPosition(FillLayer::initialFillXPosition(FillLayerType::Mask)); |
| 4834 | for (child = child->next(); child; child = child->next()) |
| 4835 | child->clearXPosition(); |
| 4836 | } |
| 4837 | static void applyInheritWebkitMaskPositionX(BuilderState& builderState) |
| 4838 | { |
| 4839 | // Check for no-op before copying anything. |
| 4840 | if (builderState.parentStyle().maskLayers() == builderState.style().maskLayers()) |
| 4841 | return; |
| 4842 | |
| 4843 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4844 | FillLayer* previousChild = nullptr; |
| 4845 | for (auto* parent = &builderState.parentStyle().maskLayers(); parent && parent->isXPositionSet(); parent = parent->next()) { |
| 4846 | if (!child) { |
| 4847 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 4848 | child = previousChild->next(); |
| 4849 | } |
| 4850 | child->setXPosition(parent->xPosition()); |
| 4851 | previousChild = child; |
| 4852 | child = previousChild->next(); |
| 4853 | } |
| 4854 | for (; child; child = child->next()) |
| 4855 | child->clearXPosition(); |
| 4856 | } |
| 4857 | static void applyValueWebkitMaskPositionX(BuilderState& builderState, CSSValue& value) |
| 4858 | { |
| 4859 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4860 | FillLayer* previousChild = nullptr; |
| 4861 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 4862 | // Walk each value and put it into a layer, creating new layers as needed. |
| 4863 | for (auto& item : downcast<CSSValueList>(value)) { |
| 4864 | if (!child) { |
| 4865 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 4866 | child = previousChild->next(); |
| 4867 | } |
| 4868 | builderState.styleMap().mapFillXPosition(CSSPropertyWebkitMaskPositionX, *child, item); |
| 4869 | previousChild = child; |
| 4870 | child = child->next(); |
| 4871 | } |
| 4872 | } else { |
| 4873 | builderState.styleMap().mapFillXPosition(CSSPropertyWebkitMaskPositionX, *child, value); |
| 4874 | child = child->next(); |
| 4875 | } |
| 4876 | for (; child; child = child->next()) |
| 4877 | child->clearXPosition(); |
| 4878 | } |
| 4879 | static void applyInitialWebkitMaskPositionY(BuilderState& builderState) |
| 4880 | { |
| 4881 | // Check for (single-layer) no-op before clearing anything. |
| 4882 | auto& layers = builderState.style().maskLayers(); |
| 4883 | if (!layers.next() && (!layers.isYPositionSet() || layers.yPosition() == FillLayer::initialFillYPosition(FillLayerType::Mask))) |
| 4884 | return; |
| 4885 | |
| 4886 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4887 | child->setYPosition(FillLayer::initialFillYPosition(FillLayerType::Mask)); |
| 4888 | for (child = child->next(); child; child = child->next()) |
| 4889 | child->clearYPosition(); |
| 4890 | } |
| 4891 | static void applyInheritWebkitMaskPositionY(BuilderState& builderState) |
| 4892 | { |
| 4893 | // Check for no-op before copying anything. |
| 4894 | if (builderState.parentStyle().maskLayers() == builderState.style().maskLayers()) |
| 4895 | return; |
| 4896 | |
| 4897 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4898 | FillLayer* previousChild = nullptr; |
| 4899 | for (auto* parent = &builderState.parentStyle().maskLayers(); parent && parent->isYPositionSet(); parent = parent->next()) { |
| 4900 | if (!child) { |
| 4901 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 4902 | child = previousChild->next(); |
| 4903 | } |
| 4904 | child->setYPosition(parent->yPosition()); |
| 4905 | previousChild = child; |
| 4906 | child = previousChild->next(); |
| 4907 | } |
| 4908 | for (; child; child = child->next()) |
| 4909 | child->clearYPosition(); |
| 4910 | } |
| 4911 | static void applyValueWebkitMaskPositionY(BuilderState& builderState, CSSValue& value) |
| 4912 | { |
| 4913 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4914 | FillLayer* previousChild = nullptr; |
| 4915 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 4916 | // Walk each value and put it into a layer, creating new layers as needed. |
| 4917 | for (auto& item : downcast<CSSValueList>(value)) { |
| 4918 | if (!child) { |
| 4919 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 4920 | child = previousChild->next(); |
| 4921 | } |
| 4922 | builderState.styleMap().mapFillYPosition(CSSPropertyWebkitMaskPositionY, *child, item); |
| 4923 | previousChild = child; |
| 4924 | child = child->next(); |
| 4925 | } |
| 4926 | } else { |
| 4927 | builderState.styleMap().mapFillYPosition(CSSPropertyWebkitMaskPositionY, *child, value); |
| 4928 | child = child->next(); |
| 4929 | } |
| 4930 | for (; child; child = child->next()) |
| 4931 | child->clearYPosition(); |
| 4932 | } |
| 4933 | static void applyInitialWebkitMaskRepeatX(BuilderState& builderState) |
| 4934 | { |
| 4935 | // Check for (single-layer) no-op before clearing anything. |
| 4936 | auto& layers = builderState.style().maskLayers(); |
| 4937 | if (!layers.next() && (!layers.isRepeatXSet() || layers.repeatX() == FillLayer::initialFillRepeatX(FillLayerType::Mask))) |
| 4938 | return; |
| 4939 | |
| 4940 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4941 | child->setRepeatX(FillLayer::initialFillRepeatX(FillLayerType::Mask)); |
| 4942 | for (child = child->next(); child; child = child->next()) |
| 4943 | child->clearRepeatX(); |
| 4944 | } |
| 4945 | static void applyInheritWebkitMaskRepeatX(BuilderState& builderState) |
| 4946 | { |
| 4947 | // Check for no-op before copying anything. |
| 4948 | if (builderState.parentStyle().maskLayers() == builderState.style().maskLayers()) |
| 4949 | return; |
| 4950 | |
| 4951 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4952 | FillLayer* previousChild = nullptr; |
| 4953 | for (auto* parent = &builderState.parentStyle().maskLayers(); parent && parent->isRepeatXSet(); parent = parent->next()) { |
| 4954 | if (!child) { |
| 4955 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 4956 | child = previousChild->next(); |
| 4957 | } |
| 4958 | child->setRepeatX(parent->repeatX()); |
| 4959 | previousChild = child; |
| 4960 | child = previousChild->next(); |
| 4961 | } |
| 4962 | for (; child; child = child->next()) |
| 4963 | child->clearRepeatX(); |
| 4964 | } |
| 4965 | static void applyValueWebkitMaskRepeatX(BuilderState& builderState, CSSValue& value) |
| 4966 | { |
| 4967 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4968 | FillLayer* previousChild = nullptr; |
| 4969 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 4970 | // Walk each value and put it into a layer, creating new layers as needed. |
| 4971 | for (auto& item : downcast<CSSValueList>(value)) { |
| 4972 | if (!child) { |
| 4973 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 4974 | child = previousChild->next(); |
| 4975 | } |
| 4976 | builderState.styleMap().mapFillRepeatX(CSSPropertyWebkitMaskRepeatX, *child, item); |
| 4977 | previousChild = child; |
| 4978 | child = child->next(); |
| 4979 | } |
| 4980 | } else { |
| 4981 | builderState.styleMap().mapFillRepeatX(CSSPropertyWebkitMaskRepeatX, *child, value); |
| 4982 | child = child->next(); |
| 4983 | } |
| 4984 | for (; child; child = child->next()) |
| 4985 | child->clearRepeatX(); |
| 4986 | } |
| 4987 | static void applyInitialWebkitMaskRepeatY(BuilderState& builderState) |
| 4988 | { |
| 4989 | // Check for (single-layer) no-op before clearing anything. |
| 4990 | auto& layers = builderState.style().maskLayers(); |
| 4991 | if (!layers.next() && (!layers.isRepeatYSet() || layers.repeatY() == FillLayer::initialFillRepeatY(FillLayerType::Mask))) |
| 4992 | return; |
| 4993 | |
| 4994 | auto* child = &builderState.style().ensureMaskLayers(); |
| 4995 | child->setRepeatY(FillLayer::initialFillRepeatY(FillLayerType::Mask)); |
| 4996 | for (child = child->next(); child; child = child->next()) |
| 4997 | child->clearRepeatY(); |
| 4998 | } |
| 4999 | static void applyInheritWebkitMaskRepeatY(BuilderState& builderState) |
| 5000 | { |
| 5001 | // Check for no-op before copying anything. |
| 5002 | if (builderState.parentStyle().maskLayers() == builderState.style().maskLayers()) |
| 5003 | return; |
| 5004 | |
| 5005 | auto* child = &builderState.style().ensureMaskLayers(); |
| 5006 | FillLayer* previousChild = nullptr; |
| 5007 | for (auto* parent = &builderState.parentStyle().maskLayers(); parent && parent->isRepeatYSet(); parent = parent->next()) { |
| 5008 | if (!child) { |
| 5009 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 5010 | child = previousChild->next(); |
| 5011 | } |
| 5012 | child->setRepeatY(parent->repeatY()); |
| 5013 | previousChild = child; |
| 5014 | child = previousChild->next(); |
| 5015 | } |
| 5016 | for (; child; child = child->next()) |
| 5017 | child->clearRepeatY(); |
| 5018 | } |
| 5019 | static void applyValueWebkitMaskRepeatY(BuilderState& builderState, CSSValue& value) |
| 5020 | { |
| 5021 | auto* child = &builderState.style().ensureMaskLayers(); |
| 5022 | FillLayer* previousChild = nullptr; |
| 5023 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 5024 | // Walk each value and put it into a layer, creating new layers as needed. |
| 5025 | for (auto& item : downcast<CSSValueList>(value)) { |
| 5026 | if (!child) { |
| 5027 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 5028 | child = previousChild->next(); |
| 5029 | } |
| 5030 | builderState.styleMap().mapFillRepeatY(CSSPropertyWebkitMaskRepeatY, *child, item); |
| 5031 | previousChild = child; |
| 5032 | child = child->next(); |
| 5033 | } |
| 5034 | } else { |
| 5035 | builderState.styleMap().mapFillRepeatY(CSSPropertyWebkitMaskRepeatY, *child, value); |
| 5036 | child = child->next(); |
| 5037 | } |
| 5038 | for (; child; child = child->next()) |
| 5039 | child->clearRepeatY(); |
| 5040 | } |
| 5041 | static void applyInitialWebkitMaskSize(BuilderState& builderState) |
| 5042 | { |
| 5043 | // Check for (single-layer) no-op before clearing anything. |
| 5044 | auto& layers = builderState.style().maskLayers(); |
| 5045 | if (!layers.next() && (!layers.isSizeSet() || layers.size() == FillLayer::initialFillSize(FillLayerType::Mask))) |
| 5046 | return; |
| 5047 | |
| 5048 | auto* child = &builderState.style().ensureMaskLayers(); |
| 5049 | child->setSize(FillLayer::initialFillSize(FillLayerType::Mask)); |
| 5050 | for (child = child->next(); child; child = child->next()) |
| 5051 | child->clearSize(); |
| 5052 | } |
| 5053 | static void applyInheritWebkitMaskSize(BuilderState& builderState) |
| 5054 | { |
| 5055 | // Check for no-op before copying anything. |
| 5056 | if (builderState.parentStyle().maskLayers() == builderState.style().maskLayers()) |
| 5057 | return; |
| 5058 | |
| 5059 | auto* child = &builderState.style().ensureMaskLayers(); |
| 5060 | FillLayer* previousChild = nullptr; |
| 5061 | for (auto* parent = &builderState.parentStyle().maskLayers(); parent && parent->isSizeSet(); parent = parent->next()) { |
| 5062 | if (!child) { |
| 5063 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 5064 | child = previousChild->next(); |
| 5065 | } |
| 5066 | child->setSize(parent->size()); |
| 5067 | previousChild = child; |
| 5068 | child = previousChild->next(); |
| 5069 | } |
| 5070 | for (; child; child = child->next()) |
| 5071 | child->clearSize(); |
| 5072 | } |
| 5073 | static void applyValueWebkitMaskSize(BuilderState& builderState, CSSValue& value) |
| 5074 | { |
| 5075 | auto* child = &builderState.style().ensureMaskLayers(); |
| 5076 | FillLayer* previousChild = nullptr; |
| 5077 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 5078 | // Walk each value and put it into a layer, creating new layers as needed. |
| 5079 | for (auto& item : downcast<CSSValueList>(value)) { |
| 5080 | if (!child) { |
| 5081 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 5082 | child = previousChild->next(); |
| 5083 | } |
| 5084 | builderState.styleMap().mapFillSize(CSSPropertyWebkitMaskSize, *child, item); |
| 5085 | previousChild = child; |
| 5086 | child = child->next(); |
| 5087 | } |
| 5088 | } else { |
| 5089 | builderState.styleMap().mapFillSize(CSSPropertyWebkitMaskSize, *child, value); |
| 5090 | child = child->next(); |
| 5091 | } |
| 5092 | for (; child; child = child->next()) |
| 5093 | child->clearSize(); |
| 5094 | } |
| 5095 | static void applyInitialWebkitMaskSourceType(BuilderState& builderState) |
| 5096 | { |
| 5097 | // Check for (single-layer) no-op before clearing anything. |
| 5098 | auto& layers = builderState.style().maskLayers(); |
| 5099 | if (!layers.next() && (!layers.isMaskSourceTypeSet() || layers.maskSourceType() == FillLayer::initialFillMaskSourceType(FillLayerType::Mask))) |
| 5100 | return; |
| 5101 | |
| 5102 | auto* child = &builderState.style().ensureMaskLayers(); |
| 5103 | child->setMaskSourceType(FillLayer::initialFillMaskSourceType(FillLayerType::Mask)); |
| 5104 | for (child = child->next(); child; child = child->next()) |
| 5105 | child->clearMaskSourceType(); |
| 5106 | } |
| 5107 | static void applyInheritWebkitMaskSourceType(BuilderState& builderState) |
| 5108 | { |
| 5109 | // Check for no-op before copying anything. |
| 5110 | if (builderState.parentStyle().maskLayers() == builderState.style().maskLayers()) |
| 5111 | return; |
| 5112 | |
| 5113 | auto* child = &builderState.style().ensureMaskLayers(); |
| 5114 | FillLayer* previousChild = nullptr; |
| 5115 | for (auto* parent = &builderState.parentStyle().maskLayers(); parent && parent->isMaskSourceTypeSet(); parent = parent->next()) { |
| 5116 | if (!child) { |
| 5117 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 5118 | child = previousChild->next(); |
| 5119 | } |
| 5120 | child->setMaskSourceType(parent->maskSourceType()); |
| 5121 | previousChild = child; |
| 5122 | child = previousChild->next(); |
| 5123 | } |
| 5124 | for (; child; child = child->next()) |
| 5125 | child->clearMaskSourceType(); |
| 5126 | } |
| 5127 | static void applyValueWebkitMaskSourceType(BuilderState& builderState, CSSValue& value) |
| 5128 | { |
| 5129 | auto* child = &builderState.style().ensureMaskLayers(); |
| 5130 | FillLayer* previousChild = nullptr; |
| 5131 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
| 5132 | // Walk each value and put it into a layer, creating new layers as needed. |
| 5133 | for (auto& item : downcast<CSSValueList>(value)) { |
| 5134 | if (!child) { |
| 5135 | previousChild->setNext(FillLayer::create(FillLayerType::Mask)); |
| 5136 | child = previousChild->next(); |
| 5137 | } |
| 5138 | builderState.styleMap().mapFillMaskSourceType(CSSPropertyWebkitMaskSourceType, *child, item); |
| 5139 | previousChild = child; |
| 5140 | child = child->next(); |
| 5141 | } |
| 5142 | } else { |
| 5143 | builderState.styleMap().mapFillMaskSourceType(CSSPropertyWebkitMaskSourceType, *child, value); |
| 5144 | child = child->next(); |
| 5145 | } |
| 5146 | for (; child; child = child->next()) |
| 5147 | child->clearMaskSourceType(); |
| 5148 | } |
| 5149 | static void applyInitialWebkitNbspMode(BuilderState& builderState) |
| 5150 | { |
| 5151 | builderState.style().setNBSPMode(RenderStyle::initialNBSPMode()); |
| 5152 | } |
| 5153 | static void applyInheritWebkitNbspMode(BuilderState& builderState) |
| 5154 | { |
| 5155 | builderState.style().setNBSPMode(forwardInheritedValue(builderState.parentStyle().nbspMode())); |
| 5156 | } |
| 5157 | static void applyValueWebkitNbspMode(BuilderState& builderState, CSSValue& value) |
| 5158 | { |
| 5159 | builderState.style().setNBSPMode(downcast<CSSPrimitiveValue>(value)); |
| 5160 | } |
| 5161 | static void applyInitialWebkitPrintColorAdjust(BuilderState& builderState) |
| 5162 | { |
| 5163 | builderState.style().setPrintColorAdjust(RenderStyle::initialPrintColorAdjust()); |
| 5164 | } |
| 5165 | static void applyInheritWebkitPrintColorAdjust(BuilderState& builderState) |
| 5166 | { |
| 5167 | builderState.style().setPrintColorAdjust(forwardInheritedValue(builderState.parentStyle().printColorAdjust())); |
| 5168 | } |
| 5169 | static void applyValueWebkitPrintColorAdjust(BuilderState& builderState, CSSValue& value) |
| 5170 | { |
| 5171 | builderState.style().setPrintColorAdjust(downcast<CSSPrimitiveValue>(value)); |
| 5172 | } |
| 5173 | static void applyInitialWebkitRtlOrdering(BuilderState& builderState) |
| 5174 | { |
| 5175 | builderState.style().setRTLOrdering(RenderStyle::initialRTLOrdering()); |
| 5176 | } |
| 5177 | static void applyInheritWebkitRtlOrdering(BuilderState& builderState) |
| 5178 | { |
| 5179 | builderState.style().setRTLOrdering(forwardInheritedValue(builderState.parentStyle().rtlOrdering())); |
| 5180 | } |
| 5181 | static void applyValueWebkitRtlOrdering(BuilderState& builderState, CSSValue& value) |
| 5182 | { |
| 5183 | builderState.style().setRTLOrdering(downcast<CSSPrimitiveValue>(value)); |
| 5184 | } |
| 5185 | static void applyInitialWebkitRubyPosition(BuilderState& builderState) |
| 5186 | { |
| 5187 | builderState.style().setRubyPosition(RenderStyle::initialRubyPosition()); |
| 5188 | } |
| 5189 | static void applyInheritWebkitRubyPosition(BuilderState& builderState) |
| 5190 | { |
| 5191 | builderState.style().setRubyPosition(forwardInheritedValue(builderState.parentStyle().rubyPosition())); |
| 5192 | } |
| 5193 | static void applyValueWebkitRubyPosition(BuilderState& builderState, CSSValue& value) |
| 5194 | { |
| 5195 | builderState.style().setRubyPosition(downcast<CSSPrimitiveValue>(value)); |
| 5196 | } |
| 5197 | static void applyInitialWebkitTextCombine(BuilderState& builderState) |
| 5198 | { |
| 5199 | builderState.style().setTextCombine(RenderStyle::initialTextCombine()); |
| 5200 | } |
| 5201 | static void applyInheritWebkitTextCombine(BuilderState& builderState) |
| 5202 | { |
| 5203 | builderState.style().setTextCombine(forwardInheritedValue(builderState.parentStyle().textCombine())); |
| 5204 | } |
| 5205 | static void applyValueWebkitTextCombine(BuilderState& builderState, CSSValue& value) |
| 5206 | { |
| 5207 | builderState.style().setTextCombine(downcast<CSSPrimitiveValue>(value)); |
| 5208 | } |
| 5209 | static void applyInitialWebkitTextEmphasisColor(BuilderState& builderState) |
| 5210 | { |
| 5211 | if (builderState.applyPropertyToRegularStyle()) |
| 5212 | builderState.style().setTextEmphasisColor(RenderStyle::currentColor()); |
| 5213 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 5214 | builderState.style().setVisitedLinkTextEmphasisColor(RenderStyle::currentColor()); |
| 5215 | } |
| 5216 | static void applyInheritWebkitTextEmphasisColor(BuilderState& builderState) |
| 5217 | { |
| 5218 | Color color = builderState.parentStyle().textEmphasisColor(); |
| 5219 | if (builderState.applyPropertyToRegularStyle()) |
| 5220 | builderState.style().setTextEmphasisColor(color); |
| 5221 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 5222 | builderState.style().setVisitedLinkTextEmphasisColor(color); |
| 5223 | } |
| 5224 | static void applyValueWebkitTextEmphasisColor(BuilderState& builderState, CSSValue& value) |
| 5225 | { |
| 5226 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
| 5227 | if (builderState.applyPropertyToRegularStyle()) |
| 5228 | builderState.style().setTextEmphasisColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
| 5229 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 5230 | builderState.style().setVisitedLinkTextEmphasisColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
| 5231 | } |
| 5232 | static void applyInitialWebkitTextEmphasisPosition(BuilderState& builderState) |
| 5233 | { |
| 5234 | builderState.style().setTextEmphasisPosition(RenderStyle::initialTextEmphasisPosition()); |
| 5235 | } |
| 5236 | static void applyInheritWebkitTextEmphasisPosition(BuilderState& builderState) |
| 5237 | { |
| 5238 | builderState.style().setTextEmphasisPosition(forwardInheritedValue(builderState.parentStyle().textEmphasisPosition())); |
| 5239 | } |
| 5240 | static void applyValueWebkitTextEmphasisPosition(BuilderState& builderState, CSSValue& value) |
| 5241 | { |
| 5242 | builderState.style().setTextEmphasisPosition(BuilderConverter::convertTextEmphasisPosition(builderState, value)); |
| 5243 | } |
| 5244 | static void applyInitialWebkitTextFillColor(BuilderState& builderState) |
| 5245 | { |
| 5246 | if (builderState.applyPropertyToRegularStyle()) |
| 5247 | builderState.style().setTextFillColor(RenderStyle::currentColor()); |
| 5248 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 5249 | builderState.style().setVisitedLinkTextFillColor(RenderStyle::currentColor()); |
| 5250 | } |
| 5251 | static void applyInheritWebkitTextFillColor(BuilderState& builderState) |
| 5252 | { |
| 5253 | Color color = builderState.parentStyle().textFillColor(); |
| 5254 | if (builderState.applyPropertyToRegularStyle()) |
| 5255 | builderState.style().setTextFillColor(color); |
| 5256 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 5257 | builderState.style().setVisitedLinkTextFillColor(color); |
| 5258 | } |
| 5259 | static void applyValueWebkitTextFillColor(BuilderState& builderState, CSSValue& value) |
| 5260 | { |
| 5261 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
| 5262 | if (builderState.applyPropertyToRegularStyle()) |
| 5263 | builderState.style().setTextFillColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
| 5264 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 5265 | builderState.style().setVisitedLinkTextFillColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
| 5266 | } |
| 5267 | static void applyInitialWebkitTextSecurity(BuilderState& builderState) |
| 5268 | { |
| 5269 | builderState.style().setTextSecurity(RenderStyle::initialTextSecurity()); |
| 5270 | } |
| 5271 | static void applyInheritWebkitTextSecurity(BuilderState& builderState) |
| 5272 | { |
| 5273 | builderState.style().setTextSecurity(forwardInheritedValue(builderState.parentStyle().textSecurity())); |
| 5274 | } |
| 5275 | static void applyValueWebkitTextSecurity(BuilderState& builderState, CSSValue& value) |
| 5276 | { |
| 5277 | builderState.style().setTextSecurity(downcast<CSSPrimitiveValue>(value)); |
| 5278 | } |
| 5279 | static void applyInitialWebkitTextStrokeColor(BuilderState& builderState) |
| 5280 | { |
| 5281 | if (builderState.applyPropertyToRegularStyle()) |
| 5282 | builderState.style().setTextStrokeColor(RenderStyle::currentColor()); |
| 5283 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 5284 | builderState.style().setVisitedLinkTextStrokeColor(RenderStyle::currentColor()); |
| 5285 | } |
| 5286 | static void applyInheritWebkitTextStrokeColor(BuilderState& builderState) |
| 5287 | { |
| 5288 | Color color = builderState.parentStyle().textStrokeColor(); |
| 5289 | if (builderState.applyPropertyToRegularStyle()) |
| 5290 | builderState.style().setTextStrokeColor(color); |
| 5291 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 5292 | builderState.style().setVisitedLinkTextStrokeColor(color); |
| 5293 | } |
| 5294 | static void applyValueWebkitTextStrokeColor(BuilderState& builderState, CSSValue& value) |
| 5295 | { |
| 5296 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
| 5297 | if (builderState.applyPropertyToRegularStyle()) |
| 5298 | builderState.style().setTextStrokeColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
| 5299 | if (builderState.applyPropertyToVisitedLinkStyle()) |
| 5300 | builderState.style().setVisitedLinkTextStrokeColor(builderState.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
| 5301 | } |
| 5302 | static void applyInitialWebkitTextStrokeWidth(BuilderState& builderState) |
| 5303 | { |
| 5304 | builderState.style().setTextStrokeWidth(RenderStyle::initialTextStrokeWidth()); |
| 5305 | } |
| 5306 | static void applyInheritWebkitTextStrokeWidth(BuilderState& builderState) |
| 5307 | { |
| 5308 | builderState.style().setTextStrokeWidth(forwardInheritedValue(builderState.parentStyle().textStrokeWidth())); |
| 5309 | } |
| 5310 | static void applyValueWebkitTextStrokeWidth(BuilderState& builderState, CSSValue& value) |
| 5311 | { |
| 5312 | builderState.style().setTextStrokeWidth(BuilderConverter::convertTextStrokeWidth(builderState, value)); |
| 5313 | } |
| 5314 | static void applyInitialWebkitTransformStyle(BuilderState& builderState) |
| 5315 | { |
| 5316 | builderState.style().setTransformStyle3D(RenderStyle::initialTransformStyle3D()); |
| 5317 | } |
| 5318 | static void applyInheritWebkitTransformStyle(BuilderState& builderState) |
| 5319 | { |
| 5320 | builderState.style().setTransformStyle3D(forwardInheritedValue(builderState.parentStyle().transformStyle3D())); |
| 5321 | } |
| 5322 | static void applyValueWebkitTransformStyle(BuilderState& builderState, CSSValue& value) |
| 5323 | { |
| 5324 | builderState.style().setTransformStyle3D(downcast<CSSPrimitiveValue>(value)); |
| 5325 | } |
| 5326 | static void applyInitialWebkitUserDrag(BuilderState& builderState) |
| 5327 | { |
| 5328 | builderState.style().setUserDrag(RenderStyle::initialUserDrag()); |
| 5329 | } |
| 5330 | static void applyInheritWebkitUserDrag(BuilderState& builderState) |
| 5331 | { |
| 5332 | builderState.style().setUserDrag(forwardInheritedValue(builderState.parentStyle().userDrag())); |
| 5333 | } |
| 5334 | static void applyValueWebkitUserDrag(BuilderState& builderState, CSSValue& value) |
| 5335 | { |
| 5336 | builderState.style().setUserDrag(downcast<CSSPrimitiveValue>(value)); |
| 5337 | } |
| 5338 | static void applyInitialWebkitUserModify(BuilderState& builderState) |
| 5339 | { |
| 5340 | builderState.style().setUserModify(RenderStyle::initialUserModify()); |
| 5341 | } |
| 5342 | static void applyInheritWebkitUserModify(BuilderState& builderState) |
| 5343 | { |
| 5344 | builderState.style().setUserModify(forwardInheritedValue(builderState.parentStyle().userModify())); |
| 5345 | } |
| 5346 | static void applyValueWebkitUserModify(BuilderState& builderState, CSSValue& value) |
| 5347 | { |
| 5348 | builderState.style().setUserModify(downcast<CSSPrimitiveValue>(value)); |
| 5349 | } |
| 5350 | static void applyInitialWebkitUserSelect(BuilderState& builderState) |
| 5351 | { |
| 5352 | builderState.style().setUserSelect(RenderStyle::initialUserSelect()); |
| 5353 | } |
| 5354 | static void applyInheritWebkitUserSelect(BuilderState& builderState) |
| 5355 | { |
| 5356 | builderState.style().setUserSelect(forwardInheritedValue(builderState.parentStyle().userSelect())); |
| 5357 | } |
| 5358 | static void applyValueWebkitUserSelect(BuilderState& builderState, CSSValue& value) |
| 5359 | { |
| 5360 | builderState.style().setUserSelect(downcast<CSSPrimitiveValue>(value)); |
| 5361 | } |
| 5362 | }; |
| 5363 | |
| 5364 | void BuilderGenerated::applyProperty(CSSPropertyID property, BuilderState& builderState, CSSValue& value, bool isInitial, bool isInherit, const CSSRegisteredCustomProperty* registered) |
| 5365 | { |
| 5366 | switch (property) { |
| 5367 | case CSSPropertyInvalid: |
| 5368 | break; |
| 5369 | case CSSPropertyCustom: { |
| 5370 | auto& customProperty = downcast<CSSCustomPropertyValue>(value); |
| 5371 | if (isInitial) |
| 5372 | BuilderCustom::applyInitialCustomProperty(builderState, registered, customProperty.name()); |
| 5373 | else if (isInherit) |
| 5374 | BuilderCustom::applyInheritCustomProperty(builderState, registered, customProperty.name()); |
| 5375 | else |
| 5376 | BuilderCustom::applyValueCustomProperty(builderState, registered, customProperty); |
| 5377 | break; |
| 5378 | } |
| 5379 | case CSSPropertyColor: |
| 5380 | if (isInitial) |
| 5381 | BuilderFunctions::applyInitialColor(builderState); |
| 5382 | else if (isInherit) |
| 5383 | BuilderFunctions::applyInheritColor(builderState); |
| 5384 | else |
| 5385 | BuilderFunctions::applyValueColor(builderState, value); |
| 5386 | break; |
| 5387 | case CSSPropertyColorScheme: |
| 5388 | if (isInitial) |
| 5389 | BuilderFunctions::applyInitialColorScheme(builderState); |
| 5390 | else if (isInherit) |
| 5391 | BuilderFunctions::applyInheritColorScheme(builderState); |
| 5392 | else |
| 5393 | BuilderCustom::applyValueColorScheme(builderState, value); |
| 5394 | break; |
| 5395 | case CSSPropertyDirection: |
| 5396 | if (isInitial) |
| 5397 | BuilderFunctions::applyInitialDirection(builderState); |
| 5398 | else if (isInherit) |
| 5399 | BuilderFunctions::applyInheritDirection(builderState); |
| 5400 | else |
| 5401 | BuilderCustom::applyValueDirection(builderState, value); |
| 5402 | break; |
| 5403 | case CSSPropertyDisplay: |
| 5404 | if (isInitial) |
| 5405 | BuilderFunctions::applyInitialDisplay(builderState); |
| 5406 | else if (isInherit) |
| 5407 | BuilderCustom::applyInheritDisplay(builderState); |
| 5408 | else |
| 5409 | BuilderCustom::applyValueDisplay(builderState, value); |
| 5410 | break; |
| 5411 | case CSSPropertyFontFamily: |
| 5412 | if (isInitial) |
| 5413 | BuilderCustom::applyInitialFontFamily(builderState); |
| 5414 | else if (isInherit) |
| 5415 | BuilderCustom::applyInheritFontFamily(builderState); |
| 5416 | else |
| 5417 | BuilderCustom::applyValueFontFamily(builderState, value); |
| 5418 | break; |
| 5419 | case CSSPropertyFontFeatureSettings: |
| 5420 | if (isInitial) |
| 5421 | BuilderCustom::applyInitialFontFeatureSettings(builderState); |
| 5422 | else if (isInherit) |
| 5423 | BuilderCustom::applyInheritFontFeatureSettings(builderState); |
| 5424 | else |
| 5425 | BuilderFunctions::applyValueFontFeatureSettings(builderState, value); |
| 5426 | break; |
| 5427 | case CSSPropertyFontOpticalSizing: |
| 5428 | if (isInitial) |
| 5429 | BuilderFunctions::applyInitialFontOpticalSizing(builderState); |
| 5430 | else if (isInherit) |
| 5431 | BuilderFunctions::applyInheritFontOpticalSizing(builderState); |
| 5432 | else |
| 5433 | BuilderFunctions::applyValueFontOpticalSizing(builderState, value); |
| 5434 | break; |
| 5435 | case CSSPropertyFontSize: |
| 5436 | if (isInitial) |
| 5437 | BuilderCustom::applyInitialFontSize(builderState); |
| 5438 | else if (isInherit) |
| 5439 | BuilderCustom::applyInheritFontSize(builderState); |
| 5440 | else |
| 5441 | BuilderCustom::applyValueFontSize(builderState, value); |
| 5442 | break; |
| 5443 | case CSSPropertyFontStretch: |
| 5444 | if (isInitial) |
| 5445 | BuilderFunctions::applyInitialFontStretch(builderState); |
| 5446 | else if (isInherit) |
| 5447 | BuilderFunctions::applyInheritFontStretch(builderState); |
| 5448 | else |
| 5449 | BuilderFunctions::applyValueFontStretch(builderState, value); |
| 5450 | break; |
| 5451 | case CSSPropertyFontStyle: |
| 5452 | if (isInitial) |
| 5453 | BuilderCustom::applyInitialFontStyle(builderState); |
| 5454 | else if (isInherit) |
| 5455 | BuilderCustom::applyInheritFontStyle(builderState); |
| 5456 | else |
| 5457 | BuilderCustom::applyValueFontStyle(builderState, value); |
| 5458 | break; |
| 5459 | case CSSPropertyFontSynthesis: |
| 5460 | if (isInitial) |
| 5461 | BuilderFunctions::applyInitialFontSynthesis(builderState); |
| 5462 | else if (isInherit) |
| 5463 | BuilderFunctions::applyInheritFontSynthesis(builderState); |
| 5464 | else |
| 5465 | BuilderFunctions::applyValueFontSynthesis(builderState, value); |
| 5466 | break; |
| 5467 | case CSSPropertyFontVariantAlternates: |
| 5468 | if (isInitial) |
| 5469 | BuilderFunctions::applyInitialFontVariantAlternates(builderState); |
| 5470 | else if (isInherit) |
| 5471 | BuilderFunctions::applyInheritFontVariantAlternates(builderState); |
| 5472 | else |
| 5473 | BuilderFunctions::applyValueFontVariantAlternates(builderState, value); |
| 5474 | break; |
| 5475 | case CSSPropertyFontVariantCaps: |
| 5476 | if (isInitial) |
| 5477 | BuilderFunctions::applyInitialFontVariantCaps(builderState); |
| 5478 | else if (isInherit) |
| 5479 | BuilderFunctions::applyInheritFontVariantCaps(builderState); |
| 5480 | else |
| 5481 | BuilderFunctions::applyValueFontVariantCaps(builderState, value); |
| 5482 | break; |
| 5483 | case CSSPropertyFontVariantEastAsian: |
| 5484 | if (isInitial) |
| 5485 | BuilderCustom::applyInitialFontVariantEastAsian(builderState); |
| 5486 | else if (isInherit) |
| 5487 | BuilderCustom::applyInheritFontVariantEastAsian(builderState); |
| 5488 | else |
| 5489 | BuilderCustom::applyValueFontVariantEastAsian(builderState, value); |
| 5490 | break; |
| 5491 | case CSSPropertyFontVariantLigatures: |
| 5492 | if (isInitial) |
| 5493 | BuilderCustom::applyInitialFontVariantLigatures(builderState); |
| 5494 | else if (isInherit) |
| 5495 | BuilderCustom::applyInheritFontVariantLigatures(builderState); |
| 5496 | else |
| 5497 | BuilderCustom::applyValueFontVariantLigatures(builderState, value); |
| 5498 | break; |
| 5499 | case CSSPropertyFontVariantNumeric: |
| 5500 | if (isInitial) |
| 5501 | BuilderCustom::applyInitialFontVariantNumeric(builderState); |
| 5502 | else if (isInherit) |
| 5503 | BuilderCustom::applyInheritFontVariantNumeric(builderState); |
| 5504 | else |
| 5505 | BuilderCustom::applyValueFontVariantNumeric(builderState, value); |
| 5506 | break; |
| 5507 | case CSSPropertyFontVariantPosition: |
| 5508 | if (isInitial) |
| 5509 | BuilderFunctions::applyInitialFontVariantPosition(builderState); |
| 5510 | else if (isInherit) |
| 5511 | BuilderFunctions::applyInheritFontVariantPosition(builderState); |
| 5512 | else |
| 5513 | BuilderFunctions::applyValueFontVariantPosition(builderState, value); |
| 5514 | break; |
| 5515 | case CSSPropertyFontVariationSettings: |
| 5516 | if (isInitial) |
| 5517 | BuilderCustom::applyInitialFontVariationSettings(builderState); |
| 5518 | else if (isInherit) |
| 5519 | BuilderCustom::applyInheritFontVariationSettings(builderState); |
| 5520 | else |
| 5521 | BuilderFunctions::applyValueFontVariationSettings(builderState, value); |
| 5522 | break; |
| 5523 | case CSSPropertyFontWeight: |
| 5524 | if (isInitial) |
| 5525 | BuilderFunctions::applyInitialFontWeight(builderState); |
| 5526 | else if (isInherit) |
| 5527 | BuilderFunctions::applyInheritFontWeight(builderState); |
| 5528 | else |
| 5529 | BuilderFunctions::applyValueFontWeight(builderState, value); |
| 5530 | break; |
| 5531 | case CSSPropertyTextOrientation: |
| 5532 | if (isInitial) |
| 5533 | BuilderFunctions::applyInitialTextOrientation(builderState); |
| 5534 | else if (isInherit) |
| 5535 | BuilderFunctions::applyInheritTextOrientation(builderState); |
| 5536 | else |
| 5537 | BuilderCustom::applyValueTextOrientation(builderState, value); |
| 5538 | break; |
| 5539 | case CSSPropertyTextRendering: |
| 5540 | if (isInitial) |
| 5541 | BuilderFunctions::applyInitialTextRendering(builderState); |
| 5542 | else if (isInherit) |
| 5543 | BuilderFunctions::applyInheritTextRendering(builderState); |
| 5544 | else |
| 5545 | BuilderFunctions::applyValueTextRendering(builderState, value); |
| 5546 | break; |
| 5547 | case CSSPropertyWritingMode: |
| 5548 | if (isInitial) |
| 5549 | BuilderFunctions::applyInitialWritingMode(builderState); |
| 5550 | else if (isInherit) |
| 5551 | BuilderFunctions::applyInheritWritingMode(builderState); |
| 5552 | else |
| 5553 | BuilderCustom::applyValueWritingMode(builderState, value); |
| 5554 | break; |
| 5555 | case CSSPropertyZoom: |
| 5556 | if (isInitial) |
| 5557 | BuilderCustom::applyInitialZoom(builderState); |
| 5558 | else if (isInherit) |
| 5559 | BuilderCustom::applyInheritZoom(builderState); |
| 5560 | else |
| 5561 | BuilderCustom::applyValueZoom(builderState, value); |
| 5562 | break; |
| 5563 | case CSSPropertyWebkitFontKerning: |
| 5564 | if (isInitial) |
| 5565 | BuilderFunctions::applyInitialWebkitFontKerning(builderState); |
| 5566 | else if (isInherit) |
| 5567 | BuilderFunctions::applyInheritWebkitFontKerning(builderState); |
| 5568 | else |
| 5569 | BuilderFunctions::applyValueWebkitFontKerning(builderState, value); |
| 5570 | break; |
| 5571 | case CSSPropertyWebkitFontSmoothing: |
| 5572 | if (isInitial) |
| 5573 | BuilderFunctions::applyInitialWebkitFontSmoothing(builderState); |
| 5574 | else if (isInherit) |
| 5575 | BuilderFunctions::applyInheritWebkitFontSmoothing(builderState); |
| 5576 | else |
| 5577 | BuilderFunctions::applyValueWebkitFontSmoothing(builderState, value); |
| 5578 | break; |
| 5579 | case CSSPropertyWebkitLocale: |
| 5580 | if (isInitial) |
| 5581 | BuilderFunctions::applyInitialWebkitLocale(builderState); |
| 5582 | else if (isInherit) |
| 5583 | BuilderFunctions::applyInheritWebkitLocale(builderState); |
| 5584 | else |
| 5585 | BuilderCustom::applyValueWebkitLocale(builderState, value); |
| 5586 | break; |
| 5587 | case CSSPropertyWebkitTextOrientation: |
| 5588 | if (isInitial) |
| 5589 | BuilderFunctions::applyInitialWebkitTextOrientation(builderState); |
| 5590 | else if (isInherit) |
| 5591 | BuilderFunctions::applyInheritWebkitTextOrientation(builderState); |
| 5592 | else |
| 5593 | BuilderCustom::applyValueWebkitTextOrientation(builderState, value); |
| 5594 | break; |
| 5595 | case CSSPropertyWebkitTextSizeAdjust: |
| 5596 | if (isInitial) |
| 5597 | BuilderFunctions::applyInitialWebkitTextSizeAdjust(builderState); |
| 5598 | else if (isInherit) |
| 5599 | BuilderFunctions::applyInheritWebkitTextSizeAdjust(builderState); |
| 5600 | else |
| 5601 | BuilderCustom::applyValueWebkitTextSizeAdjust(builderState, value); |
| 5602 | break; |
| 5603 | case CSSPropertyWebkitTextZoom: |
| 5604 | if (isInitial) |
| 5605 | BuilderFunctions::applyInitialWebkitTextZoom(builderState); |
| 5606 | else if (isInherit) |
| 5607 | BuilderFunctions::applyInheritWebkitTextZoom(builderState); |
| 5608 | else |
| 5609 | BuilderCustom::applyValueWebkitTextZoom(builderState, value); |
| 5610 | break; |
| 5611 | case CSSPropertyLetterSpacing: |
| 5612 | if (isInitial) |
| 5613 | BuilderCustom::applyInitialLetterSpacing(builderState); |
| 5614 | else if (isInherit) |
| 5615 | BuilderCustom::applyInheritLetterSpacing(builderState); |
| 5616 | else |
| 5617 | BuilderCustom::applyValueLetterSpacing(builderState, value); |
| 5618 | break; |
| 5619 | case CSSPropertyAdditiveSymbols: |
| 5620 | break; |
| 5621 | case CSSPropertyAlignContent: |
| 5622 | if (isInitial) |
| 5623 | BuilderFunctions::applyInitialAlignContent(builderState); |
| 5624 | else if (isInherit) |
| 5625 | BuilderFunctions::applyInheritAlignContent(builderState); |
| 5626 | else |
| 5627 | BuilderFunctions::applyValueAlignContent(builderState, value); |
| 5628 | break; |
| 5629 | case CSSPropertyAlignItems: |
| 5630 | if (isInitial) |
| 5631 | BuilderFunctions::applyInitialAlignItems(builderState); |
| 5632 | else if (isInherit) |
| 5633 | BuilderFunctions::applyInheritAlignItems(builderState); |
| 5634 | else |
| 5635 | BuilderFunctions::applyValueAlignItems(builderState, value); |
| 5636 | break; |
| 5637 | case CSSPropertyAlignSelf: |
| 5638 | if (isInitial) |
| 5639 | BuilderFunctions::applyInitialAlignSelf(builderState); |
| 5640 | else if (isInherit) |
| 5641 | BuilderFunctions::applyInheritAlignSelf(builderState); |
| 5642 | else |
| 5643 | BuilderFunctions::applyValueAlignSelf(builderState, value); |
| 5644 | break; |
| 5645 | case CSSPropertyAlignmentBaseline: |
| 5646 | if (isInitial) |
| 5647 | BuilderFunctions::applyInitialAlignmentBaseline(builderState); |
| 5648 | else if (isInherit) |
| 5649 | BuilderFunctions::applyInheritAlignmentBaseline(builderState); |
| 5650 | else |
| 5651 | BuilderFunctions::applyValueAlignmentBaseline(builderState, value); |
| 5652 | break; |
| 5653 | case CSSPropertyAll: |
| 5654 | ASSERT(isShorthandCSSProperty(property)); |
| 5655 | ASSERT_NOT_REACHED(); |
| 5656 | break; |
| 5657 | case CSSPropertyAlt: |
| 5658 | if (isInitial) |
| 5659 | BuilderFunctions::applyInitialAlt(builderState); |
| 5660 | else if (isInherit) |
| 5661 | BuilderFunctions::applyInheritAlt(builderState); |
| 5662 | else |
| 5663 | BuilderCustom::applyValueAlt(builderState, value); |
| 5664 | break; |
| 5665 | case CSSPropertyAnimation: |
| 5666 | ASSERT(isShorthandCSSProperty(property)); |
| 5667 | ASSERT_NOT_REACHED(); |
| 5668 | break; |
| 5669 | case CSSPropertyAnimationDelay: |
| 5670 | if (isInitial) |
| 5671 | BuilderFunctions::applyInitialAnimationDelay(builderState); |
| 5672 | else if (isInherit) |
| 5673 | BuilderFunctions::applyInheritAnimationDelay(builderState); |
| 5674 | else |
| 5675 | BuilderFunctions::applyValueAnimationDelay(builderState, value); |
| 5676 | break; |
| 5677 | case CSSPropertyAnimationDirection: |
| 5678 | if (isInitial) |
| 5679 | BuilderFunctions::applyInitialAnimationDirection(builderState); |
| 5680 | else if (isInherit) |
| 5681 | BuilderFunctions::applyInheritAnimationDirection(builderState); |
| 5682 | else |
| 5683 | BuilderFunctions::applyValueAnimationDirection(builderState, value); |
| 5684 | break; |
| 5685 | case CSSPropertyAnimationDuration: |
| 5686 | if (isInitial) |
| 5687 | BuilderFunctions::applyInitialAnimationDuration(builderState); |
| 5688 | else if (isInherit) |
| 5689 | BuilderFunctions::applyInheritAnimationDuration(builderState); |
| 5690 | else |
| 5691 | BuilderFunctions::applyValueAnimationDuration(builderState, value); |
| 5692 | break; |
| 5693 | case CSSPropertyAnimationFillMode: |
| 5694 | if (isInitial) |
| 5695 | BuilderFunctions::applyInitialAnimationFillMode(builderState); |
| 5696 | else if (isInherit) |
| 5697 | BuilderFunctions::applyInheritAnimationFillMode(builderState); |
| 5698 | else |
| 5699 | BuilderFunctions::applyValueAnimationFillMode(builderState, value); |
| 5700 | break; |
| 5701 | case CSSPropertyAnimationIterationCount: |
| 5702 | if (isInitial) |
| 5703 | BuilderFunctions::applyInitialAnimationIterationCount(builderState); |
| 5704 | else if (isInherit) |
| 5705 | BuilderFunctions::applyInheritAnimationIterationCount(builderState); |
| 5706 | else |
| 5707 | BuilderFunctions::applyValueAnimationIterationCount(builderState, value); |
| 5708 | break; |
| 5709 | case CSSPropertyAnimationName: |
| 5710 | if (isInitial) |
| 5711 | BuilderFunctions::applyInitialAnimationName(builderState); |
| 5712 | else if (isInherit) |
| 5713 | BuilderFunctions::applyInheritAnimationName(builderState); |
| 5714 | else |
| 5715 | BuilderFunctions::applyValueAnimationName(builderState, value); |
| 5716 | break; |
| 5717 | case CSSPropertyAnimationPlayState: |
| 5718 | if (isInitial) |
| 5719 | BuilderFunctions::applyInitialAnimationPlayState(builderState); |
| 5720 | else if (isInherit) |
| 5721 | BuilderFunctions::applyInheritAnimationPlayState(builderState); |
| 5722 | else |
| 5723 | BuilderFunctions::applyValueAnimationPlayState(builderState, value); |
| 5724 | break; |
| 5725 | case CSSPropertyAnimationTimingFunction: |
| 5726 | if (isInitial) |
| 5727 | BuilderFunctions::applyInitialAnimationTimingFunction(builderState); |
| 5728 | else if (isInherit) |
| 5729 | BuilderFunctions::applyInheritAnimationTimingFunction(builderState); |
| 5730 | else |
| 5731 | BuilderFunctions::applyValueAnimationTimingFunction(builderState, value); |
| 5732 | break; |
| 5733 | case CSSPropertyAspectRatio: |
| 5734 | if (isInitial) |
| 5735 | BuilderCustom::applyInitialAspectRatio(builderState); |
| 5736 | else if (isInherit) |
| 5737 | BuilderCustom::applyInheritAspectRatio(builderState); |
| 5738 | else |
| 5739 | BuilderCustom::applyValueAspectRatio(builderState, value); |
| 5740 | break; |
| 5741 | case CSSPropertyBackground: |
| 5742 | ASSERT(isShorthandCSSProperty(property)); |
| 5743 | ASSERT_NOT_REACHED(); |
| 5744 | break; |
| 5745 | case CSSPropertyBackgroundAttachment: |
| 5746 | if (isInitial) |
| 5747 | BuilderFunctions::applyInitialBackgroundAttachment(builderState); |
| 5748 | else if (isInherit) |
| 5749 | BuilderFunctions::applyInheritBackgroundAttachment(builderState); |
| 5750 | else |
| 5751 | BuilderFunctions::applyValueBackgroundAttachment(builderState, value); |
| 5752 | break; |
| 5753 | case CSSPropertyBackgroundBlendMode: |
| 5754 | if (isInitial) |
| 5755 | BuilderFunctions::applyInitialBackgroundBlendMode(builderState); |
| 5756 | else if (isInherit) |
| 5757 | BuilderFunctions::applyInheritBackgroundBlendMode(builderState); |
| 5758 | else |
| 5759 | BuilderFunctions::applyValueBackgroundBlendMode(builderState, value); |
| 5760 | break; |
| 5761 | case CSSPropertyBackgroundClip: |
| 5762 | if (isInitial) |
| 5763 | BuilderFunctions::applyInitialBackgroundClip(builderState); |
| 5764 | else if (isInherit) |
| 5765 | BuilderFunctions::applyInheritBackgroundClip(builderState); |
| 5766 | else |
| 5767 | BuilderFunctions::applyValueBackgroundClip(builderState, value); |
| 5768 | break; |
| 5769 | case CSSPropertyBackgroundColor: |
| 5770 | if (isInitial) |
| 5771 | BuilderFunctions::applyInitialBackgroundColor(builderState); |
| 5772 | else if (isInherit) |
| 5773 | BuilderFunctions::applyInheritBackgroundColor(builderState); |
| 5774 | else |
| 5775 | BuilderFunctions::applyValueBackgroundColor(builderState, value); |
| 5776 | break; |
| 5777 | case CSSPropertyBackgroundImage: |
| 5778 | if (isInitial) |
| 5779 | BuilderFunctions::applyInitialBackgroundImage(builderState); |
| 5780 | else if (isInherit) |
| 5781 | BuilderFunctions::applyInheritBackgroundImage(builderState); |
| 5782 | else |
| 5783 | BuilderFunctions::applyValueBackgroundImage(builderState, value); |
| 5784 | break; |
| 5785 | case CSSPropertyBackgroundOrigin: |
| 5786 | if (isInitial) |
| 5787 | BuilderFunctions::applyInitialBackgroundOrigin(builderState); |
| 5788 | else if (isInherit) |
| 5789 | BuilderFunctions::applyInheritBackgroundOrigin(builderState); |
| 5790 | else |
| 5791 | BuilderFunctions::applyValueBackgroundOrigin(builderState, value); |
| 5792 | break; |
| 5793 | case CSSPropertyBackgroundPosition: |
| 5794 | ASSERT(isShorthandCSSProperty(property)); |
| 5795 | ASSERT_NOT_REACHED(); |
| 5796 | break; |
| 5797 | case CSSPropertyBackgroundPositionX: |
| 5798 | if (isInitial) |
| 5799 | BuilderFunctions::applyInitialBackgroundPositionX(builderState); |
| 5800 | else if (isInherit) |
| 5801 | BuilderFunctions::applyInheritBackgroundPositionX(builderState); |
| 5802 | else |
| 5803 | BuilderFunctions::applyValueBackgroundPositionX(builderState, value); |
| 5804 | break; |
| 5805 | case CSSPropertyBackgroundPositionY: |
| 5806 | if (isInitial) |
| 5807 | BuilderFunctions::applyInitialBackgroundPositionY(builderState); |
| 5808 | else if (isInherit) |
| 5809 | BuilderFunctions::applyInheritBackgroundPositionY(builderState); |
| 5810 | else |
| 5811 | BuilderFunctions::applyValueBackgroundPositionY(builderState, value); |
| 5812 | break; |
| 5813 | case CSSPropertyBackgroundRepeat: |
| 5814 | ASSERT(isShorthandCSSProperty(property)); |
| 5815 | ASSERT_NOT_REACHED(); |
| 5816 | break; |
| 5817 | case CSSPropertyBackgroundRepeatX: |
| 5818 | if (isInitial) |
| 5819 | BuilderFunctions::applyInitialBackgroundRepeatX(builderState); |
| 5820 | else if (isInherit) |
| 5821 | BuilderFunctions::applyInheritBackgroundRepeatX(builderState); |
| 5822 | else |
| 5823 | BuilderFunctions::applyValueBackgroundRepeatX(builderState, value); |
| 5824 | break; |
| 5825 | case CSSPropertyBackgroundRepeatY: |
| 5826 | if (isInitial) |
| 5827 | BuilderFunctions::applyInitialBackgroundRepeatY(builderState); |
| 5828 | else if (isInherit) |
| 5829 | BuilderFunctions::applyInheritBackgroundRepeatY(builderState); |
| 5830 | else |
| 5831 | BuilderFunctions::applyValueBackgroundRepeatY(builderState, value); |
| 5832 | break; |
| 5833 | case CSSPropertyBackgroundSize: |
| 5834 | if (isInitial) |
| 5835 | BuilderFunctions::applyInitialBackgroundSize(builderState); |
| 5836 | else if (isInherit) |
| 5837 | BuilderFunctions::applyInheritBackgroundSize(builderState); |
| 5838 | else |
| 5839 | BuilderFunctions::applyValueBackgroundSize(builderState, value); |
| 5840 | break; |
| 5841 | case CSSPropertyBaselineShift: |
| 5842 | if (isInitial) |
| 5843 | BuilderFunctions::applyInitialBaselineShift(builderState); |
| 5844 | else if (isInherit) |
| 5845 | BuilderFunctions::applyInheritBaselineShift(builderState); |
| 5846 | else |
| 5847 | BuilderCustom::applyValueBaselineShift(builderState, value); |
| 5848 | break; |
| 5849 | case CSSPropertyBlockSize: |
| 5850 | break; |
| 5851 | case CSSPropertyBorder: |
| 5852 | ASSERT(isShorthandCSSProperty(property)); |
| 5853 | ASSERT_NOT_REACHED(); |
| 5854 | break; |
| 5855 | case CSSPropertyBorderBlock: |
| 5856 | ASSERT(isShorthandCSSProperty(property)); |
| 5857 | ASSERT_NOT_REACHED(); |
| 5858 | break; |
| 5859 | case CSSPropertyBorderBlockColor: |
| 5860 | ASSERT(isShorthandCSSProperty(property)); |
| 5861 | ASSERT_NOT_REACHED(); |
| 5862 | break; |
| 5863 | case CSSPropertyBorderBlockEnd: |
| 5864 | ASSERT(isShorthandCSSProperty(property)); |
| 5865 | ASSERT_NOT_REACHED(); |
| 5866 | break; |
| 5867 | case CSSPropertyBorderBlockEndColor: |
| 5868 | break; |
| 5869 | case CSSPropertyBorderBlockEndStyle: |
| 5870 | break; |
| 5871 | case CSSPropertyBorderBlockEndWidth: |
| 5872 | break; |
| 5873 | case CSSPropertyBorderBlockStart: |
| 5874 | ASSERT(isShorthandCSSProperty(property)); |
| 5875 | ASSERT_NOT_REACHED(); |
| 5876 | break; |
| 5877 | case CSSPropertyBorderBlockStartColor: |
| 5878 | break; |
| 5879 | case CSSPropertyBorderBlockStartStyle: |
| 5880 | break; |
| 5881 | case CSSPropertyBorderBlockStartWidth: |
| 5882 | break; |
| 5883 | case CSSPropertyBorderBlockStyle: |
| 5884 | ASSERT(isShorthandCSSProperty(property)); |
| 5885 | ASSERT_NOT_REACHED(); |
| 5886 | break; |
| 5887 | case CSSPropertyBorderBlockWidth: |
| 5888 | ASSERT(isShorthandCSSProperty(property)); |
| 5889 | ASSERT_NOT_REACHED(); |
| 5890 | break; |
| 5891 | case CSSPropertyBorderBottom: |
| 5892 | ASSERT(isShorthandCSSProperty(property)); |
| 5893 | ASSERT_NOT_REACHED(); |
| 5894 | break; |
| 5895 | case CSSPropertyBorderBottomColor: |
| 5896 | if (isInitial) |
| 5897 | BuilderFunctions::applyInitialBorderBottomColor(builderState); |
| 5898 | else if (isInherit) |
| 5899 | BuilderFunctions::applyInheritBorderBottomColor(builderState); |
| 5900 | else |
| 5901 | BuilderFunctions::applyValueBorderBottomColor(builderState, value); |
| 5902 | break; |
| 5903 | case CSSPropertyBorderBottomLeftRadius: |
| 5904 | if (isInitial) |
| 5905 | BuilderFunctions::applyInitialBorderBottomLeftRadius(builderState); |
| 5906 | else if (isInherit) |
| 5907 | BuilderCustom::applyInheritBorderBottomLeftRadius(builderState); |
| 5908 | else |
| 5909 | BuilderCustom::applyValueBorderBottomLeftRadius(builderState, value); |
| 5910 | break; |
| 5911 | case CSSPropertyBorderBottomRightRadius: |
| 5912 | if (isInitial) |
| 5913 | BuilderFunctions::applyInitialBorderBottomRightRadius(builderState); |
| 5914 | else if (isInherit) |
| 5915 | BuilderCustom::applyInheritBorderBottomRightRadius(builderState); |
| 5916 | else |
| 5917 | BuilderCustom::applyValueBorderBottomRightRadius(builderState, value); |
| 5918 | break; |
| 5919 | case CSSPropertyBorderBottomStyle: |
| 5920 | if (isInitial) |
| 5921 | BuilderFunctions::applyInitialBorderBottomStyle(builderState); |
| 5922 | else if (isInherit) |
| 5923 | BuilderFunctions::applyInheritBorderBottomStyle(builderState); |
| 5924 | else |
| 5925 | BuilderFunctions::applyValueBorderBottomStyle(builderState, value); |
| 5926 | break; |
| 5927 | case CSSPropertyBorderBottomWidth: |
| 5928 | if (isInitial) |
| 5929 | BuilderFunctions::applyInitialBorderBottomWidth(builderState); |
| 5930 | else if (isInherit) |
| 5931 | BuilderFunctions::applyInheritBorderBottomWidth(builderState); |
| 5932 | else |
| 5933 | BuilderFunctions::applyValueBorderBottomWidth(builderState, value); |
| 5934 | break; |
| 5935 | case CSSPropertyBorderCollapse: |
| 5936 | if (isInitial) |
| 5937 | BuilderFunctions::applyInitialBorderCollapse(builderState); |
| 5938 | else if (isInherit) |
| 5939 | BuilderFunctions::applyInheritBorderCollapse(builderState); |
| 5940 | else |
| 5941 | BuilderFunctions::applyValueBorderCollapse(builderState, value); |
| 5942 | break; |
| 5943 | case CSSPropertyBorderColor: |
| 5944 | ASSERT(isShorthandCSSProperty(property)); |
| 5945 | ASSERT_NOT_REACHED(); |
| 5946 | break; |
| 5947 | case CSSPropertyBorderEndEndRadius: |
| 5948 | break; |
| 5949 | case CSSPropertyBorderEndStartRadius: |
| 5950 | break; |
| 5951 | case CSSPropertyBorderImage: |
| 5952 | ASSERT(isShorthandCSSProperty(property)); |
| 5953 | ASSERT_NOT_REACHED(); |
| 5954 | break; |
| 5955 | case CSSPropertyBorderImageOutset: |
| 5956 | if (isInitial) |
| 5957 | BuilderCustom::applyInitialBorderImageOutset(builderState); |
| 5958 | else if (isInherit) |
| 5959 | BuilderCustom::applyInheritBorderImageOutset(builderState); |
| 5960 | else |
| 5961 | BuilderCustom::applyValueBorderImageOutset(builderState, value); |
| 5962 | break; |
| 5963 | case CSSPropertyBorderImageRepeat: |
| 5964 | if (isInitial) |
| 5965 | BuilderCustom::applyInitialBorderImageRepeat(builderState); |
| 5966 | else if (isInherit) |
| 5967 | BuilderCustom::applyInheritBorderImageRepeat(builderState); |
| 5968 | else |
| 5969 | BuilderCustom::applyValueBorderImageRepeat(builderState, value); |
| 5970 | break; |
| 5971 | case CSSPropertyBorderImageSlice: |
| 5972 | if (isInitial) |
| 5973 | BuilderCustom::applyInitialBorderImageSlice(builderState); |
| 5974 | else if (isInherit) |
| 5975 | BuilderCustom::applyInheritBorderImageSlice(builderState); |
| 5976 | else |
| 5977 | BuilderCustom::applyValueBorderImageSlice(builderState, value); |
| 5978 | break; |
| 5979 | case CSSPropertyBorderImageSource: |
| 5980 | if (isInitial) |
| 5981 | BuilderFunctions::applyInitialBorderImageSource(builderState); |
| 5982 | else if (isInherit) |
| 5983 | BuilderFunctions::applyInheritBorderImageSource(builderState); |
| 5984 | else |
| 5985 | BuilderFunctions::applyValueBorderImageSource(builderState, value); |
| 5986 | break; |
| 5987 | case CSSPropertyBorderImageWidth: |
| 5988 | if (isInitial) |
| 5989 | BuilderCustom::applyInitialBorderImageWidth(builderState); |
| 5990 | else if (isInherit) |
| 5991 | BuilderCustom::applyInheritBorderImageWidth(builderState); |
| 5992 | else |
| 5993 | BuilderCustom::applyValueBorderImageWidth(builderState, value); |
| 5994 | break; |
| 5995 | case CSSPropertyBorderInline: |
| 5996 | ASSERT(isShorthandCSSProperty(property)); |
| 5997 | ASSERT_NOT_REACHED(); |
| 5998 | break; |
| 5999 | case CSSPropertyBorderInlineColor: |
| 6000 | ASSERT(isShorthandCSSProperty(property)); |
| 6001 | ASSERT_NOT_REACHED(); |
| 6002 | break; |
| 6003 | case CSSPropertyBorderInlineEnd: |
| 6004 | ASSERT(isShorthandCSSProperty(property)); |
| 6005 | ASSERT_NOT_REACHED(); |
| 6006 | break; |
| 6007 | case CSSPropertyBorderInlineEndColor: |
| 6008 | break; |
| 6009 | case CSSPropertyBorderInlineEndStyle: |
| 6010 | break; |
| 6011 | case CSSPropertyBorderInlineEndWidth: |
| 6012 | break; |
| 6013 | case CSSPropertyBorderInlineStart: |
| 6014 | ASSERT(isShorthandCSSProperty(property)); |
| 6015 | ASSERT_NOT_REACHED(); |
| 6016 | break; |
| 6017 | case CSSPropertyBorderInlineStartColor: |
| 6018 | break; |
| 6019 | case CSSPropertyBorderInlineStartStyle: |
| 6020 | break; |
| 6021 | case CSSPropertyBorderInlineStartWidth: |
| 6022 | break; |
| 6023 | case CSSPropertyBorderInlineStyle: |
| 6024 | ASSERT(isShorthandCSSProperty(property)); |
| 6025 | ASSERT_NOT_REACHED(); |
| 6026 | break; |
| 6027 | case CSSPropertyBorderInlineWidth: |
| 6028 | ASSERT(isShorthandCSSProperty(property)); |
| 6029 | ASSERT_NOT_REACHED(); |
| 6030 | break; |
| 6031 | case CSSPropertyBorderLeft: |
| 6032 | ASSERT(isShorthandCSSProperty(property)); |
| 6033 | ASSERT_NOT_REACHED(); |
| 6034 | break; |
| 6035 | case CSSPropertyBorderLeftColor: |
| 6036 | if (isInitial) |
| 6037 | BuilderFunctions::applyInitialBorderLeftColor(builderState); |
| 6038 | else if (isInherit) |
| 6039 | BuilderFunctions::applyInheritBorderLeftColor(builderState); |
| 6040 | else |
| 6041 | BuilderFunctions::applyValueBorderLeftColor(builderState, value); |
| 6042 | break; |
| 6043 | case CSSPropertyBorderLeftStyle: |
| 6044 | if (isInitial) |
| 6045 | BuilderFunctions::applyInitialBorderLeftStyle(builderState); |
| 6046 | else if (isInherit) |
| 6047 | BuilderFunctions::applyInheritBorderLeftStyle(builderState); |
| 6048 | else |
| 6049 | BuilderFunctions::applyValueBorderLeftStyle(builderState, value); |
| 6050 | break; |
| 6051 | case CSSPropertyBorderLeftWidth: |
| 6052 | if (isInitial) |
| 6053 | BuilderFunctions::applyInitialBorderLeftWidth(builderState); |
| 6054 | else if (isInherit) |
| 6055 | BuilderFunctions::applyInheritBorderLeftWidth(builderState); |
| 6056 | else |
| 6057 | BuilderFunctions::applyValueBorderLeftWidth(builderState, value); |
| 6058 | break; |
| 6059 | case CSSPropertyBorderRadius: |
| 6060 | ASSERT(isShorthandCSSProperty(property)); |
| 6061 | ASSERT_NOT_REACHED(); |
| 6062 | break; |
| 6063 | case CSSPropertyBorderRight: |
| 6064 | ASSERT(isShorthandCSSProperty(property)); |
| 6065 | ASSERT_NOT_REACHED(); |
| 6066 | break; |
| 6067 | case CSSPropertyBorderRightColor: |
| 6068 | if (isInitial) |
| 6069 | BuilderFunctions::applyInitialBorderRightColor(builderState); |
| 6070 | else if (isInherit) |
| 6071 | BuilderFunctions::applyInheritBorderRightColor(builderState); |
| 6072 | else |
| 6073 | BuilderFunctions::applyValueBorderRightColor(builderState, value); |
| 6074 | break; |
| 6075 | case CSSPropertyBorderRightStyle: |
| 6076 | if (isInitial) |
| 6077 | BuilderFunctions::applyInitialBorderRightStyle(builderState); |
| 6078 | else if (isInherit) |
| 6079 | BuilderFunctions::applyInheritBorderRightStyle(builderState); |
| 6080 | else |
| 6081 | BuilderFunctions::applyValueBorderRightStyle(builderState, value); |
| 6082 | break; |
| 6083 | case CSSPropertyBorderRightWidth: |
| 6084 | if (isInitial) |
| 6085 | BuilderFunctions::applyInitialBorderRightWidth(builderState); |
| 6086 | else if (isInherit) |
| 6087 | BuilderFunctions::applyInheritBorderRightWidth(builderState); |
| 6088 | else |
| 6089 | BuilderFunctions::applyValueBorderRightWidth(builderState, value); |
| 6090 | break; |
| 6091 | case CSSPropertyBorderSpacing: |
| 6092 | ASSERT(isShorthandCSSProperty(property)); |
| 6093 | ASSERT_NOT_REACHED(); |
| 6094 | break; |
| 6095 | case CSSPropertyBorderStartEndRadius: |
| 6096 | break; |
| 6097 | case CSSPropertyBorderStartStartRadius: |
| 6098 | break; |
| 6099 | case CSSPropertyBorderStyle: |
| 6100 | ASSERT(isShorthandCSSProperty(property)); |
| 6101 | ASSERT_NOT_REACHED(); |
| 6102 | break; |
| 6103 | case CSSPropertyBorderTop: |
| 6104 | ASSERT(isShorthandCSSProperty(property)); |
| 6105 | ASSERT_NOT_REACHED(); |
| 6106 | break; |
| 6107 | case CSSPropertyBorderTopColor: |
| 6108 | if (isInitial) |
| 6109 | BuilderFunctions::applyInitialBorderTopColor(builderState); |
| 6110 | else if (isInherit) |
| 6111 | BuilderFunctions::applyInheritBorderTopColor(builderState); |
| 6112 | else |
| 6113 | BuilderFunctions::applyValueBorderTopColor(builderState, value); |
| 6114 | break; |
| 6115 | case CSSPropertyBorderTopLeftRadius: |
| 6116 | if (isInitial) |
| 6117 | BuilderFunctions::applyInitialBorderTopLeftRadius(builderState); |
| 6118 | else if (isInherit) |
| 6119 | BuilderCustom::applyInheritBorderTopLeftRadius(builderState); |
| 6120 | else |
| 6121 | BuilderCustom::applyValueBorderTopLeftRadius(builderState, value); |
| 6122 | break; |
| 6123 | case CSSPropertyBorderTopRightRadius: |
| 6124 | if (isInitial) |
| 6125 | BuilderFunctions::applyInitialBorderTopRightRadius(builderState); |
| 6126 | else if (isInherit) |
| 6127 | BuilderCustom::applyInheritBorderTopRightRadius(builderState); |
| 6128 | else |
| 6129 | BuilderCustom::applyValueBorderTopRightRadius(builderState, value); |
| 6130 | break; |
| 6131 | case CSSPropertyBorderTopStyle: |
| 6132 | if (isInitial) |
| 6133 | BuilderFunctions::applyInitialBorderTopStyle(builderState); |
| 6134 | else if (isInherit) |
| 6135 | BuilderFunctions::applyInheritBorderTopStyle(builderState); |
| 6136 | else |
| 6137 | BuilderFunctions::applyValueBorderTopStyle(builderState, value); |
| 6138 | break; |
| 6139 | case CSSPropertyBorderTopWidth: |
| 6140 | if (isInitial) |
| 6141 | BuilderFunctions::applyInitialBorderTopWidth(builderState); |
| 6142 | else if (isInherit) |
| 6143 | BuilderFunctions::applyInheritBorderTopWidth(builderState); |
| 6144 | else |
| 6145 | BuilderFunctions::applyValueBorderTopWidth(builderState, value); |
| 6146 | break; |
| 6147 | case CSSPropertyBorderWidth: |
| 6148 | ASSERT(isShorthandCSSProperty(property)); |
| 6149 | ASSERT_NOT_REACHED(); |
| 6150 | break; |
| 6151 | case CSSPropertyBottom: |
| 6152 | if (isInitial) |
| 6153 | BuilderFunctions::applyInitialBottom(builderState); |
| 6154 | else if (isInherit) |
| 6155 | BuilderFunctions::applyInheritBottom(builderState); |
| 6156 | else |
| 6157 | BuilderFunctions::applyValueBottom(builderState, value); |
| 6158 | break; |
| 6159 | case CSSPropertyBoxShadow: |
| 6160 | if (isInitial) |
| 6161 | BuilderCustom::applyInitialBoxShadow(builderState); |
| 6162 | else if (isInherit) |
| 6163 | BuilderCustom::applyInheritBoxShadow(builderState); |
| 6164 | else |
| 6165 | BuilderCustom::applyValueBoxShadow(builderState, value); |
| 6166 | break; |
| 6167 | case CSSPropertyBoxSizing: |
| 6168 | if (isInitial) |
| 6169 | BuilderFunctions::applyInitialBoxSizing(builderState); |
| 6170 | else if (isInherit) |
| 6171 | BuilderFunctions::applyInheritBoxSizing(builderState); |
| 6172 | else |
| 6173 | BuilderFunctions::applyValueBoxSizing(builderState, value); |
| 6174 | break; |
| 6175 | case CSSPropertyBreakAfter: |
| 6176 | if (isInitial) |
| 6177 | BuilderFunctions::applyInitialBreakAfter(builderState); |
| 6178 | else if (isInherit) |
| 6179 | BuilderFunctions::applyInheritBreakAfter(builderState); |
| 6180 | else |
| 6181 | BuilderFunctions::applyValueBreakAfter(builderState, value); |
| 6182 | break; |
| 6183 | case CSSPropertyBreakBefore: |
| 6184 | if (isInitial) |
| 6185 | BuilderFunctions::applyInitialBreakBefore(builderState); |
| 6186 | else if (isInherit) |
| 6187 | BuilderFunctions::applyInheritBreakBefore(builderState); |
| 6188 | else |
| 6189 | BuilderFunctions::applyValueBreakBefore(builderState, value); |
| 6190 | break; |
| 6191 | case CSSPropertyBreakInside: |
| 6192 | if (isInitial) |
| 6193 | BuilderFunctions::applyInitialBreakInside(builderState); |
| 6194 | else if (isInherit) |
| 6195 | BuilderFunctions::applyInheritBreakInside(builderState); |
| 6196 | else |
| 6197 | BuilderFunctions::applyValueBreakInside(builderState, value); |
| 6198 | break; |
| 6199 | case CSSPropertyBufferedRendering: |
| 6200 | if (isInitial) |
| 6201 | BuilderFunctions::applyInitialBufferedRendering(builderState); |
| 6202 | else if (isInherit) |
| 6203 | BuilderFunctions::applyInheritBufferedRendering(builderState); |
| 6204 | else |
| 6205 | BuilderFunctions::applyValueBufferedRendering(builderState, value); |
| 6206 | break; |
| 6207 | case CSSPropertyCaptionSide: |
| 6208 | if (isInitial) |
| 6209 | BuilderFunctions::applyInitialCaptionSide(builderState); |
| 6210 | else if (isInherit) |
| 6211 | BuilderFunctions::applyInheritCaptionSide(builderState); |
| 6212 | else |
| 6213 | BuilderFunctions::applyValueCaptionSide(builderState, value); |
| 6214 | break; |
| 6215 | case CSSPropertyCaretColor: |
| 6216 | if (isInitial) |
| 6217 | BuilderCustom::applyInitialCaretColor(builderState); |
| 6218 | else if (isInherit) |
| 6219 | BuilderCustom::applyInheritCaretColor(builderState); |
| 6220 | else |
| 6221 | BuilderCustom::applyValueCaretColor(builderState, value); |
| 6222 | break; |
| 6223 | case CSSPropertyClear: |
| 6224 | if (isInitial) |
| 6225 | BuilderFunctions::applyInitialClear(builderState); |
| 6226 | else if (isInherit) |
| 6227 | BuilderFunctions::applyInheritClear(builderState); |
| 6228 | else |
| 6229 | BuilderFunctions::applyValueClear(builderState, value); |
| 6230 | break; |
| 6231 | case CSSPropertyClip: |
| 6232 | if (isInitial) |
| 6233 | BuilderCustom::applyInitialClip(builderState); |
| 6234 | else if (isInherit) |
| 6235 | BuilderCustom::applyInheritClip(builderState); |
| 6236 | else |
| 6237 | BuilderCustom::applyValueClip(builderState, value); |
| 6238 | break; |
| 6239 | case CSSPropertyClipPath: |
| 6240 | if (isInitial) |
| 6241 | BuilderFunctions::applyInitialClipPath(builderState); |
| 6242 | else if (isInherit) |
| 6243 | BuilderFunctions::applyInheritClipPath(builderState); |
| 6244 | else |
| 6245 | BuilderFunctions::applyValueClipPath(builderState, value); |
| 6246 | break; |
| 6247 | case CSSPropertyClipRule: |
| 6248 | if (isInitial) |
| 6249 | BuilderFunctions::applyInitialClipRule(builderState); |
| 6250 | else if (isInherit) |
| 6251 | BuilderFunctions::applyInheritClipRule(builderState); |
| 6252 | else |
| 6253 | BuilderFunctions::applyValueClipRule(builderState, value); |
| 6254 | break; |
| 6255 | case CSSPropertyColorInterpolation: |
| 6256 | if (isInitial) |
| 6257 | BuilderFunctions::applyInitialColorInterpolation(builderState); |
| 6258 | else if (isInherit) |
| 6259 | BuilderFunctions::applyInheritColorInterpolation(builderState); |
| 6260 | else |
| 6261 | BuilderFunctions::applyValueColorInterpolation(builderState, value); |
| 6262 | break; |
| 6263 | case CSSPropertyColorInterpolationFilters: |
| 6264 | if (isInitial) |
| 6265 | BuilderFunctions::applyInitialColorInterpolationFilters(builderState); |
| 6266 | else if (isInherit) |
| 6267 | BuilderFunctions::applyInheritColorInterpolationFilters(builderState); |
| 6268 | else |
| 6269 | BuilderFunctions::applyValueColorInterpolationFilters(builderState, value); |
| 6270 | break; |
| 6271 | case CSSPropertyColorProfile: |
| 6272 | break; |
| 6273 | case CSSPropertyColorRendering: |
| 6274 | if (isInitial) |
| 6275 | BuilderFunctions::applyInitialColorRendering(builderState); |
| 6276 | else if (isInherit) |
| 6277 | BuilderFunctions::applyInheritColorRendering(builderState); |
| 6278 | else |
| 6279 | BuilderFunctions::applyValueColorRendering(builderState, value); |
| 6280 | break; |
| 6281 | case CSSPropertyColumnCount: |
| 6282 | if (isInitial) |
| 6283 | BuilderFunctions::applyInitialColumnCount(builderState); |
| 6284 | else if (isInherit) |
| 6285 | BuilderFunctions::applyInheritColumnCount(builderState); |
| 6286 | else |
| 6287 | BuilderFunctions::applyValueColumnCount(builderState, value); |
| 6288 | break; |
| 6289 | case CSSPropertyColumnFill: |
| 6290 | if (isInitial) |
| 6291 | BuilderFunctions::applyInitialColumnFill(builderState); |
| 6292 | else if (isInherit) |
| 6293 | BuilderFunctions::applyInheritColumnFill(builderState); |
| 6294 | else |
| 6295 | BuilderFunctions::applyValueColumnFill(builderState, value); |
| 6296 | break; |
| 6297 | case CSSPropertyColumnGap: |
| 6298 | if (isInitial) |
| 6299 | BuilderFunctions::applyInitialColumnGap(builderState); |
| 6300 | else if (isInherit) |
| 6301 | BuilderFunctions::applyInheritColumnGap(builderState); |
| 6302 | else |
| 6303 | BuilderFunctions::applyValueColumnGap(builderState, value); |
| 6304 | break; |
| 6305 | case CSSPropertyColumnRule: |
| 6306 | ASSERT(isShorthandCSSProperty(property)); |
| 6307 | ASSERT_NOT_REACHED(); |
| 6308 | break; |
| 6309 | case CSSPropertyColumnRuleColor: |
| 6310 | if (isInitial) |
| 6311 | BuilderFunctions::applyInitialColumnRuleColor(builderState); |
| 6312 | else if (isInherit) |
| 6313 | BuilderFunctions::applyInheritColumnRuleColor(builderState); |
| 6314 | else |
| 6315 | BuilderFunctions::applyValueColumnRuleColor(builderState, value); |
| 6316 | break; |
| 6317 | case CSSPropertyColumnRuleStyle: |
| 6318 | if (isInitial) |
| 6319 | BuilderFunctions::applyInitialColumnRuleStyle(builderState); |
| 6320 | else if (isInherit) |
| 6321 | BuilderFunctions::applyInheritColumnRuleStyle(builderState); |
| 6322 | else |
| 6323 | BuilderFunctions::applyValueColumnRuleStyle(builderState, value); |
| 6324 | break; |
| 6325 | case CSSPropertyColumnRuleWidth: |
| 6326 | if (isInitial) |
| 6327 | BuilderFunctions::applyInitialColumnRuleWidth(builderState); |
| 6328 | else if (isInherit) |
| 6329 | BuilderFunctions::applyInheritColumnRuleWidth(builderState); |
| 6330 | else |
| 6331 | BuilderFunctions::applyValueColumnRuleWidth(builderState, value); |
| 6332 | break; |
| 6333 | case CSSPropertyColumnSpan: |
| 6334 | if (isInitial) |
| 6335 | BuilderFunctions::applyInitialColumnSpan(builderState); |
| 6336 | else if (isInherit) |
| 6337 | BuilderFunctions::applyInheritColumnSpan(builderState); |
| 6338 | else |
| 6339 | BuilderFunctions::applyValueColumnSpan(builderState, value); |
| 6340 | break; |
| 6341 | case CSSPropertyColumnWidth: |
| 6342 | if (isInitial) |
| 6343 | BuilderFunctions::applyInitialColumnWidth(builderState); |
| 6344 | else if (isInherit) |
| 6345 | BuilderFunctions::applyInheritColumnWidth(builderState); |
| 6346 | else |
| 6347 | BuilderFunctions::applyValueColumnWidth(builderState, value); |
| 6348 | break; |
| 6349 | case CSSPropertyColumns: |
| 6350 | ASSERT(isShorthandCSSProperty(property)); |
| 6351 | ASSERT_NOT_REACHED(); |
| 6352 | break; |
| 6353 | case CSSPropertyContain: |
| 6354 | if (isInitial) |
| 6355 | BuilderCustom::applyInitialContain(builderState); |
| 6356 | else if (isInherit) |
| 6357 | BuilderCustom::applyInheritContain(builderState); |
| 6358 | else |
| 6359 | BuilderCustom::applyValueContain(builderState, value); |
| 6360 | break; |
| 6361 | case CSSPropertyContent: |
| 6362 | if (isInitial) |
| 6363 | BuilderCustom::applyInitialContent(builderState); |
| 6364 | else if (isInherit) |
| 6365 | BuilderCustom::applyInheritContent(builderState); |
| 6366 | else |
| 6367 | BuilderCustom::applyValueContent(builderState, value); |
| 6368 | break; |
| 6369 | case CSSPropertyCounterIncrement: |
| 6370 | if (isInitial) |
| 6371 | BuilderCustom::applyInitialCounterIncrement(builderState); |
| 6372 | else if (isInherit) |
| 6373 | BuilderCustom::applyInheritCounterIncrement(builderState); |
| 6374 | else |
| 6375 | BuilderCustom::applyValueCounterIncrement(builderState, value); |
| 6376 | break; |
| 6377 | case CSSPropertyCounterReset: |
| 6378 | if (isInitial) |
| 6379 | BuilderCustom::applyInitialCounterReset(builderState); |
| 6380 | else if (isInherit) |
| 6381 | BuilderCustom::applyInheritCounterReset(builderState); |
| 6382 | else |
| 6383 | BuilderCustom::applyValueCounterReset(builderState, value); |
| 6384 | break; |
| 6385 | case CSSPropertyCursor: |
| 6386 | if (isInitial) |
| 6387 | BuilderCustom::applyInitialCursor(builderState); |
| 6388 | else if (isInherit) |
| 6389 | BuilderCustom::applyInheritCursor(builderState); |
| 6390 | else |
| 6391 | BuilderCustom::applyValueCursor(builderState, value); |
| 6392 | break; |
| 6393 | case CSSPropertyCx: |
| 6394 | if (isInitial) |
| 6395 | BuilderFunctions::applyInitialCx(builderState); |
| 6396 | else if (isInherit) |
| 6397 | BuilderFunctions::applyInheritCx(builderState); |
| 6398 | else |
| 6399 | BuilderFunctions::applyValueCx(builderState, value); |
| 6400 | break; |
| 6401 | case CSSPropertyCy: |
| 6402 | if (isInitial) |
| 6403 | BuilderFunctions::applyInitialCy(builderState); |
| 6404 | else if (isInherit) |
| 6405 | BuilderFunctions::applyInheritCy(builderState); |
| 6406 | else |
| 6407 | BuilderFunctions::applyValueCy(builderState, value); |
| 6408 | break; |
| 6409 | case CSSPropertyDominantBaseline: |
| 6410 | if (isInitial) |
| 6411 | BuilderFunctions::applyInitialDominantBaseline(builderState); |
| 6412 | else if (isInherit) |
| 6413 | BuilderFunctions::applyInheritDominantBaseline(builderState); |
| 6414 | else |
| 6415 | BuilderFunctions::applyValueDominantBaseline(builderState, value); |
| 6416 | break; |
| 6417 | case CSSPropertyEmptyCells: |
| 6418 | if (isInitial) |
| 6419 | BuilderFunctions::applyInitialEmptyCells(builderState); |
| 6420 | else if (isInherit) |
| 6421 | BuilderFunctions::applyInheritEmptyCells(builderState); |
| 6422 | else |
| 6423 | BuilderFunctions::applyValueEmptyCells(builderState, value); |
| 6424 | break; |
| 6425 | case CSSPropertyEnableBackground: |
| 6426 | break; |
| 6427 | case CSSPropertyFallback: |
| 6428 | break; |
| 6429 | case CSSPropertyFill: |
| 6430 | if (isInitial) |
| 6431 | BuilderCustom::applyInitialFill(builderState); |
| 6432 | else if (isInherit) |
| 6433 | BuilderCustom::applyInheritFill(builderState); |
| 6434 | else |
| 6435 | BuilderCustom::applyValueFill(builderState, value); |
| 6436 | break; |
| 6437 | case CSSPropertyFillOpacity: |
| 6438 | if (isInitial) |
| 6439 | BuilderFunctions::applyInitialFillOpacity(builderState); |
| 6440 | else if (isInherit) |
| 6441 | BuilderFunctions::applyInheritFillOpacity(builderState); |
| 6442 | else |
| 6443 | BuilderFunctions::applyValueFillOpacity(builderState, value); |
| 6444 | break; |
| 6445 | case CSSPropertyFillRule: |
| 6446 | if (isInitial) |
| 6447 | BuilderFunctions::applyInitialFillRule(builderState); |
| 6448 | else if (isInherit) |
| 6449 | BuilderFunctions::applyInheritFillRule(builderState); |
| 6450 | else |
| 6451 | BuilderFunctions::applyValueFillRule(builderState, value); |
| 6452 | break; |
| 6453 | case CSSPropertyFilter: |
| 6454 | if (isInitial) |
| 6455 | BuilderFunctions::applyInitialFilter(builderState); |
| 6456 | else if (isInherit) |
| 6457 | BuilderFunctions::applyInheritFilter(builderState); |
| 6458 | else |
| 6459 | BuilderFunctions::applyValueFilter(builderState, value); |
| 6460 | break; |
| 6461 | case CSSPropertyFlex: |
| 6462 | ASSERT(isShorthandCSSProperty(property)); |
| 6463 | ASSERT_NOT_REACHED(); |
| 6464 | break; |
| 6465 | case CSSPropertyFlexBasis: |
| 6466 | if (isInitial) |
| 6467 | BuilderFunctions::applyInitialFlexBasis(builderState); |
| 6468 | else if (isInherit) |
| 6469 | BuilderFunctions::applyInheritFlexBasis(builderState); |
| 6470 | else |
| 6471 | BuilderFunctions::applyValueFlexBasis(builderState, value); |
| 6472 | break; |
| 6473 | case CSSPropertyFlexDirection: |
| 6474 | if (isInitial) |
| 6475 | BuilderFunctions::applyInitialFlexDirection(builderState); |
| 6476 | else if (isInherit) |
| 6477 | BuilderFunctions::applyInheritFlexDirection(builderState); |
| 6478 | else |
| 6479 | BuilderFunctions::applyValueFlexDirection(builderState, value); |
| 6480 | break; |
| 6481 | case CSSPropertyFlexFlow: |
| 6482 | ASSERT(isShorthandCSSProperty(property)); |
| 6483 | ASSERT_NOT_REACHED(); |
| 6484 | break; |
| 6485 | case CSSPropertyFlexGrow: |
| 6486 | if (isInitial) |
| 6487 | BuilderFunctions::applyInitialFlexGrow(builderState); |
| 6488 | else if (isInherit) |
| 6489 | BuilderFunctions::applyInheritFlexGrow(builderState); |
| 6490 | else |
| 6491 | BuilderFunctions::applyValueFlexGrow(builderState, value); |
| 6492 | break; |
| 6493 | case CSSPropertyFlexShrink: |
| 6494 | if (isInitial) |
| 6495 | BuilderFunctions::applyInitialFlexShrink(builderState); |
| 6496 | else if (isInherit) |
| 6497 | BuilderFunctions::applyInheritFlexShrink(builderState); |
| 6498 | else |
| 6499 | BuilderFunctions::applyValueFlexShrink(builderState, value); |
| 6500 | break; |
| 6501 | case CSSPropertyFlexWrap: |
| 6502 | if (isInitial) |
| 6503 | BuilderFunctions::applyInitialFlexWrap(builderState); |
| 6504 | else if (isInherit) |
| 6505 | BuilderFunctions::applyInheritFlexWrap(builderState); |
| 6506 | else |
| 6507 | BuilderFunctions::applyValueFlexWrap(builderState, value); |
| 6508 | break; |
| 6509 | case CSSPropertyFloat: |
| 6510 | if (isInitial) |
| 6511 | BuilderFunctions::applyInitialFloat(builderState); |
| 6512 | else if (isInherit) |
| 6513 | BuilderFunctions::applyInheritFloat(builderState); |
| 6514 | else |
| 6515 | BuilderFunctions::applyValueFloat(builderState, value); |
| 6516 | break; |
| 6517 | case CSSPropertyFloodColor: |
| 6518 | if (isInitial) |
| 6519 | BuilderFunctions::applyInitialFloodColor(builderState); |
| 6520 | else if (isInherit) |
| 6521 | BuilderFunctions::applyInheritFloodColor(builderState); |
| 6522 | else |
| 6523 | BuilderFunctions::applyValueFloodColor(builderState, value); |
| 6524 | break; |
| 6525 | case CSSPropertyFloodOpacity: |
| 6526 | if (isInitial) |
| 6527 | BuilderFunctions::applyInitialFloodOpacity(builderState); |
| 6528 | else if (isInherit) |
| 6529 | BuilderFunctions::applyInheritFloodOpacity(builderState); |
| 6530 | else |
| 6531 | BuilderFunctions::applyValueFloodOpacity(builderState, value); |
| 6532 | break; |
| 6533 | case CSSPropertyFont: |
| 6534 | ASSERT(isShorthandCSSProperty(property)); |
| 6535 | ASSERT_NOT_REACHED(); |
| 6536 | break; |
| 6537 | case CSSPropertyFontDisplay: |
| 6538 | break; |
| 6539 | case CSSPropertyFontVariant: |
| 6540 | ASSERT(isShorthandCSSProperty(property)); |
| 6541 | ASSERT_NOT_REACHED(); |
| 6542 | break; |
| 6543 | case CSSPropertyGap: |
| 6544 | ASSERT(isShorthandCSSProperty(property)); |
| 6545 | ASSERT_NOT_REACHED(); |
| 6546 | break; |
| 6547 | case CSSPropertyGlyphOrientationHorizontal: |
| 6548 | if (isInitial) |
| 6549 | BuilderFunctions::applyInitialGlyphOrientationHorizontal(builderState); |
| 6550 | else if (isInherit) |
| 6551 | BuilderFunctions::applyInheritGlyphOrientationHorizontal(builderState); |
| 6552 | else |
| 6553 | BuilderFunctions::applyValueGlyphOrientationHorizontal(builderState, value); |
| 6554 | break; |
| 6555 | case CSSPropertyGlyphOrientationVertical: |
| 6556 | if (isInitial) |
| 6557 | BuilderFunctions::applyInitialGlyphOrientationVertical(builderState); |
| 6558 | else if (isInherit) |
| 6559 | BuilderFunctions::applyInheritGlyphOrientationVertical(builderState); |
| 6560 | else |
| 6561 | BuilderFunctions::applyValueGlyphOrientationVertical(builderState, value); |
| 6562 | break; |
| 6563 | case CSSPropertyGrid: |
| 6564 | ASSERT(isShorthandCSSProperty(property)); |
| 6565 | ASSERT_NOT_REACHED(); |
| 6566 | break; |
| 6567 | case CSSPropertyGridArea: |
| 6568 | ASSERT(isShorthandCSSProperty(property)); |
| 6569 | ASSERT_NOT_REACHED(); |
| 6570 | break; |
| 6571 | case CSSPropertyGridAutoColumns: |
| 6572 | if (isInitial) |
| 6573 | BuilderFunctions::applyInitialGridAutoColumns(builderState); |
| 6574 | else if (isInherit) |
| 6575 | BuilderFunctions::applyInheritGridAutoColumns(builderState); |
| 6576 | else |
| 6577 | BuilderFunctions::applyValueGridAutoColumns(builderState, value); |
| 6578 | break; |
| 6579 | case CSSPropertyGridAutoFlow: |
| 6580 | if (isInitial) |
| 6581 | BuilderFunctions::applyInitialGridAutoFlow(builderState); |
| 6582 | else if (isInherit) |
| 6583 | BuilderFunctions::applyInheritGridAutoFlow(builderState); |
| 6584 | else |
| 6585 | BuilderFunctions::applyValueGridAutoFlow(builderState, value); |
| 6586 | break; |
| 6587 | case CSSPropertyGridAutoRows: |
| 6588 | if (isInitial) |
| 6589 | BuilderFunctions::applyInitialGridAutoRows(builderState); |
| 6590 | else if (isInherit) |
| 6591 | BuilderFunctions::applyInheritGridAutoRows(builderState); |
| 6592 | else |
| 6593 | BuilderFunctions::applyValueGridAutoRows(builderState, value); |
| 6594 | break; |
| 6595 | case CSSPropertyGridColumn: |
| 6596 | ASSERT(isShorthandCSSProperty(property)); |
| 6597 | ASSERT_NOT_REACHED(); |
| 6598 | break; |
| 6599 | case CSSPropertyGridColumnEnd: |
| 6600 | if (isInitial) |
| 6601 | BuilderFunctions::applyInitialGridColumnEnd(builderState); |
| 6602 | else if (isInherit) |
| 6603 | BuilderFunctions::applyInheritGridColumnEnd(builderState); |
| 6604 | else |
| 6605 | BuilderFunctions::applyValueGridColumnEnd(builderState, value); |
| 6606 | break; |
| 6607 | case CSSPropertyGridColumnStart: |
| 6608 | if (isInitial) |
| 6609 | BuilderFunctions::applyInitialGridColumnStart(builderState); |
| 6610 | else if (isInherit) |
| 6611 | BuilderFunctions::applyInheritGridColumnStart(builderState); |
| 6612 | else |
| 6613 | BuilderFunctions::applyValueGridColumnStart(builderState, value); |
| 6614 | break; |
| 6615 | case CSSPropertyGridRow: |
| 6616 | ASSERT(isShorthandCSSProperty(property)); |
| 6617 | ASSERT_NOT_REACHED(); |
| 6618 | break; |
| 6619 | case CSSPropertyGridRowEnd: |
| 6620 | if (isInitial) |
| 6621 | BuilderFunctions::applyInitialGridRowEnd(builderState); |
| 6622 | else if (isInherit) |
| 6623 | BuilderFunctions::applyInheritGridRowEnd(builderState); |
| 6624 | else |
| 6625 | BuilderFunctions::applyValueGridRowEnd(builderState, value); |
| 6626 | break; |
| 6627 | case CSSPropertyGridRowStart: |
| 6628 | if (isInitial) |
| 6629 | BuilderFunctions::applyInitialGridRowStart(builderState); |
| 6630 | else if (isInherit) |
| 6631 | BuilderFunctions::applyInheritGridRowStart(builderState); |
| 6632 | else |
| 6633 | BuilderFunctions::applyValueGridRowStart(builderState, value); |
| 6634 | break; |
| 6635 | case CSSPropertyGridTemplate: |
| 6636 | ASSERT(isShorthandCSSProperty(property)); |
| 6637 | ASSERT_NOT_REACHED(); |
| 6638 | break; |
| 6639 | case CSSPropertyGridTemplateAreas: |
| 6640 | if (isInitial) |
| 6641 | BuilderCustom::applyInitialGridTemplateAreas(builderState); |
| 6642 | else if (isInherit) |
| 6643 | BuilderCustom::applyInheritGridTemplateAreas(builderState); |
| 6644 | else |
| 6645 | BuilderCustom::applyValueGridTemplateAreas(builderState, value); |
| 6646 | break; |
| 6647 | case CSSPropertyGridTemplateColumns: |
| 6648 | if (isInitial) |
| 6649 | BuilderCustom::applyInitialGridTemplateColumns(builderState); |
| 6650 | else if (isInherit) |
| 6651 | BuilderCustom::applyInheritGridTemplateColumns(builderState); |
| 6652 | else |
| 6653 | BuilderCustom::applyValueGridTemplateColumns(builderState, value); |
| 6654 | break; |
| 6655 | case CSSPropertyGridTemplateRows: |
| 6656 | if (isInitial) |
| 6657 | BuilderCustom::applyInitialGridTemplateRows(builderState); |
| 6658 | else if (isInherit) |
| 6659 | BuilderCustom::applyInheritGridTemplateRows(builderState); |
| 6660 | else |
| 6661 | BuilderCustom::applyValueGridTemplateRows(builderState, value); |
| 6662 | break; |
| 6663 | case CSSPropertyHangingPunctuation: |
| 6664 | if (isInitial) |
| 6665 | BuilderFunctions::applyInitialHangingPunctuation(builderState); |
| 6666 | else if (isInherit) |
| 6667 | BuilderFunctions::applyInheritHangingPunctuation(builderState); |
| 6668 | else |
| 6669 | BuilderFunctions::applyValueHangingPunctuation(builderState, value); |
| 6670 | break; |
| 6671 | case CSSPropertyHeight: |
| 6672 | if (isInitial) |
| 6673 | BuilderFunctions::applyInitialHeight(builderState); |
| 6674 | else if (isInherit) |
| 6675 | BuilderFunctions::applyInheritHeight(builderState); |
| 6676 | else |
| 6677 | BuilderFunctions::applyValueHeight(builderState, value); |
| 6678 | break; |
| 6679 | case CSSPropertyImageOrientation: |
| 6680 | if (isInitial) |
| 6681 | BuilderFunctions::applyInitialImageOrientation(builderState); |
| 6682 | else if (isInherit) |
| 6683 | BuilderFunctions::applyInheritImageOrientation(builderState); |
| 6684 | else |
| 6685 | BuilderFunctions::applyValueImageOrientation(builderState, value); |
| 6686 | break; |
| 6687 | case CSSPropertyImageRendering: |
| 6688 | if (isInitial) |
| 6689 | BuilderFunctions::applyInitialImageRendering(builderState); |
| 6690 | else if (isInherit) |
| 6691 | BuilderFunctions::applyInheritImageRendering(builderState); |
| 6692 | else |
| 6693 | BuilderFunctions::applyValueImageRendering(builderState, value); |
| 6694 | break; |
| 6695 | case CSSPropertyInlineSize: |
| 6696 | break; |
| 6697 | case CSSPropertyInset: |
| 6698 | ASSERT(isShorthandCSSProperty(property)); |
| 6699 | ASSERT_NOT_REACHED(); |
| 6700 | break; |
| 6701 | case CSSPropertyInsetBlock: |
| 6702 | ASSERT(isShorthandCSSProperty(property)); |
| 6703 | ASSERT_NOT_REACHED(); |
| 6704 | break; |
| 6705 | case CSSPropertyInsetBlockEnd: |
| 6706 | break; |
| 6707 | case CSSPropertyInsetBlockStart: |
| 6708 | break; |
| 6709 | case CSSPropertyInsetInline: |
| 6710 | ASSERT(isShorthandCSSProperty(property)); |
| 6711 | ASSERT_NOT_REACHED(); |
| 6712 | break; |
| 6713 | case CSSPropertyInsetInlineEnd: |
| 6714 | break; |
| 6715 | case CSSPropertyInsetInlineStart: |
| 6716 | break; |
| 6717 | case CSSPropertyIsolation: |
| 6718 | if (isInitial) |
| 6719 | BuilderFunctions::applyInitialIsolation(builderState); |
| 6720 | else if (isInherit) |
| 6721 | BuilderFunctions::applyInheritIsolation(builderState); |
| 6722 | else |
| 6723 | BuilderFunctions::applyValueIsolation(builderState, value); |
| 6724 | break; |
| 6725 | case CSSPropertyJustifyContent: |
| 6726 | if (isInitial) |
| 6727 | BuilderFunctions::applyInitialJustifyContent(builderState); |
| 6728 | else if (isInherit) |
| 6729 | BuilderFunctions::applyInheritJustifyContent(builderState); |
| 6730 | else |
| 6731 | BuilderFunctions::applyValueJustifyContent(builderState, value); |
| 6732 | break; |
| 6733 | case CSSPropertyJustifyItems: |
| 6734 | if (isInitial) |
| 6735 | BuilderFunctions::applyInitialJustifyItems(builderState); |
| 6736 | else if (isInherit) |
| 6737 | BuilderFunctions::applyInheritJustifyItems(builderState); |
| 6738 | else |
| 6739 | BuilderFunctions::applyValueJustifyItems(builderState, value); |
| 6740 | break; |
| 6741 | case CSSPropertyJustifySelf: |
| 6742 | if (isInitial) |
| 6743 | BuilderFunctions::applyInitialJustifySelf(builderState); |
| 6744 | else if (isInherit) |
| 6745 | BuilderFunctions::applyInheritJustifySelf(builderState); |
| 6746 | else |
| 6747 | BuilderFunctions::applyValueJustifySelf(builderState, value); |
| 6748 | break; |
| 6749 | case CSSPropertyKerning: |
| 6750 | if (isInitial) |
| 6751 | BuilderFunctions::applyInitialKerning(builderState); |
| 6752 | else if (isInherit) |
| 6753 | BuilderFunctions::applyInheritKerning(builderState); |
| 6754 | else |
| 6755 | BuilderFunctions::applyValueKerning(builderState, value); |
| 6756 | break; |
| 6757 | case CSSPropertyLeft: |
| 6758 | if (isInitial) |
| 6759 | BuilderFunctions::applyInitialLeft(builderState); |
| 6760 | else if (isInherit) |
| 6761 | BuilderFunctions::applyInheritLeft(builderState); |
| 6762 | else |
| 6763 | BuilderFunctions::applyValueLeft(builderState, value); |
| 6764 | break; |
| 6765 | case CSSPropertyLightingColor: |
| 6766 | if (isInitial) |
| 6767 | BuilderFunctions::applyInitialLightingColor(builderState); |
| 6768 | else if (isInherit) |
| 6769 | BuilderFunctions::applyInheritLightingColor(builderState); |
| 6770 | else |
| 6771 | BuilderFunctions::applyValueLightingColor(builderState, value); |
| 6772 | break; |
| 6773 | case CSSPropertyLineBreak: |
| 6774 | if (isInitial) |
| 6775 | BuilderFunctions::applyInitialLineBreak(builderState); |
| 6776 | else if (isInherit) |
| 6777 | BuilderFunctions::applyInheritLineBreak(builderState); |
| 6778 | else |
| 6779 | BuilderFunctions::applyValueLineBreak(builderState, value); |
| 6780 | break; |
| 6781 | case CSSPropertyLineHeight: |
| 6782 | if (isInitial) |
| 6783 | BuilderCustom::applyInitialLineHeight(builderState); |
| 6784 | else if (isInherit) |
| 6785 | BuilderCustom::applyInheritLineHeight(builderState); |
| 6786 | else |
| 6787 | BuilderCustom::applyValueLineHeight(builderState, value); |
| 6788 | break; |
| 6789 | case CSSPropertyListStyle: |
| 6790 | ASSERT(isShorthandCSSProperty(property)); |
| 6791 | ASSERT_NOT_REACHED(); |
| 6792 | break; |
| 6793 | case CSSPropertyListStyleImage: |
| 6794 | if (isInitial) |
| 6795 | BuilderFunctions::applyInitialListStyleImage(builderState); |
| 6796 | else if (isInherit) |
| 6797 | BuilderFunctions::applyInheritListStyleImage(builderState); |
| 6798 | else |
| 6799 | BuilderFunctions::applyValueListStyleImage(builderState, value); |
| 6800 | break; |
| 6801 | case CSSPropertyListStylePosition: |
| 6802 | if (isInitial) |
| 6803 | BuilderFunctions::applyInitialListStylePosition(builderState); |
| 6804 | else if (isInherit) |
| 6805 | BuilderFunctions::applyInheritListStylePosition(builderState); |
| 6806 | else |
| 6807 | BuilderFunctions::applyValueListStylePosition(builderState, value); |
| 6808 | break; |
| 6809 | case CSSPropertyListStyleType: |
| 6810 | if (isInitial) |
| 6811 | BuilderCustom::applyInitialListStyleType(builderState); |
| 6812 | else if (isInherit) |
| 6813 | BuilderCustom::applyInheritListStyleType(builderState); |
| 6814 | else |
| 6815 | BuilderCustom::applyValueListStyleType(builderState, value); |
| 6816 | break; |
| 6817 | case CSSPropertyMargin: |
| 6818 | ASSERT(isShorthandCSSProperty(property)); |
| 6819 | ASSERT_NOT_REACHED(); |
| 6820 | break; |
| 6821 | case CSSPropertyMarginBlock: |
| 6822 | ASSERT(isShorthandCSSProperty(property)); |
| 6823 | ASSERT_NOT_REACHED(); |
| 6824 | break; |
| 6825 | case CSSPropertyMarginBlockEnd: |
| 6826 | break; |
| 6827 | case CSSPropertyMarginBlockStart: |
| 6828 | break; |
| 6829 | case CSSPropertyMarginBottom: |
| 6830 | if (isInitial) |
| 6831 | BuilderFunctions::applyInitialMarginBottom(builderState); |
| 6832 | else if (isInherit) |
| 6833 | BuilderFunctions::applyInheritMarginBottom(builderState); |
| 6834 | else |
| 6835 | BuilderFunctions::applyValueMarginBottom(builderState, value); |
| 6836 | break; |
| 6837 | case CSSPropertyMarginInline: |
| 6838 | ASSERT(isShorthandCSSProperty(property)); |
| 6839 | ASSERT_NOT_REACHED(); |
| 6840 | break; |
| 6841 | case CSSPropertyMarginInlineEnd: |
| 6842 | break; |
| 6843 | case CSSPropertyMarginInlineStart: |
| 6844 | break; |
| 6845 | case CSSPropertyMarginLeft: |
| 6846 | if (isInitial) |
| 6847 | BuilderFunctions::applyInitialMarginLeft(builderState); |
| 6848 | else if (isInherit) |
| 6849 | BuilderFunctions::applyInheritMarginLeft(builderState); |
| 6850 | else |
| 6851 | BuilderFunctions::applyValueMarginLeft(builderState, value); |
| 6852 | break; |
| 6853 | case CSSPropertyMarginRight: |
| 6854 | if (isInitial) |
| 6855 | BuilderFunctions::applyInitialMarginRight(builderState); |
| 6856 | else if (isInherit) |
| 6857 | BuilderFunctions::applyInheritMarginRight(builderState); |
| 6858 | else |
| 6859 | BuilderFunctions::applyValueMarginRight(builderState, value); |
| 6860 | break; |
| 6861 | case CSSPropertyMarginTop: |
| 6862 | if (isInitial) |
| 6863 | BuilderFunctions::applyInitialMarginTop(builderState); |
| 6864 | else if (isInherit) |
| 6865 | BuilderFunctions::applyInheritMarginTop(builderState); |
| 6866 | else |
| 6867 | BuilderFunctions::applyValueMarginTop(builderState, value); |
| 6868 | break; |
| 6869 | case CSSPropertyMarker: |
| 6870 | ASSERT(isShorthandCSSProperty(property)); |
| 6871 | ASSERT_NOT_REACHED(); |
| 6872 | break; |
| 6873 | case CSSPropertyMarkerEnd: |
| 6874 | if (isInitial) |
| 6875 | BuilderFunctions::applyInitialMarkerEnd(builderState); |
| 6876 | else if (isInherit) |
| 6877 | BuilderFunctions::applyInheritMarkerEnd(builderState); |
| 6878 | else |
| 6879 | BuilderFunctions::applyValueMarkerEnd(builderState, value); |
| 6880 | break; |
| 6881 | case CSSPropertyMarkerMid: |
| 6882 | if (isInitial) |
| 6883 | BuilderFunctions::applyInitialMarkerMid(builderState); |
| 6884 | else if (isInherit) |
| 6885 | BuilderFunctions::applyInheritMarkerMid(builderState); |
| 6886 | else |
| 6887 | BuilderFunctions::applyValueMarkerMid(builderState, value); |
| 6888 | break; |
| 6889 | case CSSPropertyMarkerStart: |
| 6890 | if (isInitial) |
| 6891 | BuilderFunctions::applyInitialMarkerStart(builderState); |
| 6892 | else if (isInherit) |
| 6893 | BuilderFunctions::applyInheritMarkerStart(builderState); |
| 6894 | else |
| 6895 | BuilderFunctions::applyValueMarkerStart(builderState, value); |
| 6896 | break; |
| 6897 | case CSSPropertyMask: |
| 6898 | if (isInitial) |
| 6899 | BuilderFunctions::applyInitialMask(builderState); |
| 6900 | else if (isInherit) |
| 6901 | BuilderFunctions::applyInheritMask(builderState); |
| 6902 | else |
| 6903 | BuilderFunctions::applyValueMask(builderState, value); |
| 6904 | break; |
| 6905 | case CSSPropertyMaskType: |
| 6906 | if (isInitial) |
| 6907 | BuilderFunctions::applyInitialMaskType(builderState); |
| 6908 | else if (isInherit) |
| 6909 | BuilderFunctions::applyInheritMaskType(builderState); |
| 6910 | else |
| 6911 | BuilderFunctions::applyValueMaskType(builderState, value); |
| 6912 | break; |
| 6913 | case CSSPropertyMathStyle: |
| 6914 | if (isInitial) |
| 6915 | BuilderFunctions::applyInitialMathStyle(builderState); |
| 6916 | else if (isInherit) |
| 6917 | BuilderFunctions::applyInheritMathStyle(builderState); |
| 6918 | else |
| 6919 | BuilderFunctions::applyValueMathStyle(builderState, value); |
| 6920 | break; |
| 6921 | case CSSPropertyMaxBlockSize: |
| 6922 | break; |
| 6923 | case CSSPropertyMaxHeight: |
| 6924 | if (isInitial) |
| 6925 | BuilderFunctions::applyInitialMaxHeight(builderState); |
| 6926 | else if (isInherit) |
| 6927 | BuilderFunctions::applyInheritMaxHeight(builderState); |
| 6928 | else |
| 6929 | BuilderFunctions::applyValueMaxHeight(builderState, value); |
| 6930 | break; |
| 6931 | case CSSPropertyMaxInlineSize: |
| 6932 | break; |
| 6933 | case CSSPropertyMaxWidth: |
| 6934 | if (isInitial) |
| 6935 | BuilderFunctions::applyInitialMaxWidth(builderState); |
| 6936 | else if (isInherit) |
| 6937 | BuilderFunctions::applyInheritMaxWidth(builderState); |
| 6938 | else |
| 6939 | BuilderFunctions::applyValueMaxWidth(builderState, value); |
| 6940 | break; |
| 6941 | case CSSPropertyMinBlockSize: |
| 6942 | break; |
| 6943 | case CSSPropertyMinHeight: |
| 6944 | if (isInitial) |
| 6945 | BuilderFunctions::applyInitialMinHeight(builderState); |
| 6946 | else if (isInherit) |
| 6947 | BuilderFunctions::applyInheritMinHeight(builderState); |
| 6948 | else |
| 6949 | BuilderFunctions::applyValueMinHeight(builderState, value); |
| 6950 | break; |
| 6951 | case CSSPropertyMinInlineSize: |
| 6952 | break; |
| 6953 | case CSSPropertyMinWidth: |
| 6954 | if (isInitial) |
| 6955 | BuilderFunctions::applyInitialMinWidth(builderState); |
| 6956 | else if (isInherit) |
| 6957 | BuilderFunctions::applyInheritMinWidth(builderState); |
| 6958 | else |
| 6959 | BuilderFunctions::applyValueMinWidth(builderState, value); |
| 6960 | break; |
| 6961 | case CSSPropertyMixBlendMode: |
| 6962 | if (isInitial) |
| 6963 | BuilderFunctions::applyInitialMixBlendMode(builderState); |
| 6964 | else if (isInherit) |
| 6965 | BuilderFunctions::applyInheritMixBlendMode(builderState); |
| 6966 | else |
| 6967 | BuilderFunctions::applyValueMixBlendMode(builderState, value); |
| 6968 | break; |
| 6969 | case CSSPropertyNegative: |
| 6970 | break; |
| 6971 | case CSSPropertyObjectFit: |
| 6972 | if (isInitial) |
| 6973 | BuilderFunctions::applyInitialObjectFit(builderState); |
| 6974 | else if (isInherit) |
| 6975 | BuilderFunctions::applyInheritObjectFit(builderState); |
| 6976 | else |
| 6977 | BuilderFunctions::applyValueObjectFit(builderState, value); |
| 6978 | break; |
| 6979 | case CSSPropertyObjectPosition: |
| 6980 | if (isInitial) |
| 6981 | BuilderFunctions::applyInitialObjectPosition(builderState); |
| 6982 | else if (isInherit) |
| 6983 | BuilderFunctions::applyInheritObjectPosition(builderState); |
| 6984 | else |
| 6985 | BuilderFunctions::applyValueObjectPosition(builderState, value); |
| 6986 | break; |
| 6987 | case CSSPropertyOpacity: |
| 6988 | if (isInitial) |
| 6989 | BuilderFunctions::applyInitialOpacity(builderState); |
| 6990 | else if (isInherit) |
| 6991 | BuilderFunctions::applyInheritOpacity(builderState); |
| 6992 | else |
| 6993 | BuilderFunctions::applyValueOpacity(builderState, value); |
| 6994 | break; |
| 6995 | case CSSPropertyOrder: |
| 6996 | if (isInitial) |
| 6997 | BuilderFunctions::applyInitialOrder(builderState); |
| 6998 | else if (isInherit) |
| 6999 | BuilderFunctions::applyInheritOrder(builderState); |
| 7000 | else |
| 7001 | BuilderFunctions::applyValueOrder(builderState, value); |
| 7002 | break; |
| 7003 | case CSSPropertyOrphans: |
| 7004 | if (isInitial) |
| 7005 | BuilderFunctions::applyInitialOrphans(builderState); |
| 7006 | else if (isInherit) |
| 7007 | BuilderFunctions::applyInheritOrphans(builderState); |
| 7008 | else |
| 7009 | BuilderFunctions::applyValueOrphans(builderState, value); |
| 7010 | break; |
| 7011 | case CSSPropertyOutline: |
| 7012 | ASSERT(isShorthandCSSProperty(property)); |
| 7013 | ASSERT_NOT_REACHED(); |
| 7014 | break; |
| 7015 | case CSSPropertyOutlineColor: |
| 7016 | if (isInitial) |
| 7017 | BuilderFunctions::applyInitialOutlineColor(builderState); |
| 7018 | else if (isInherit) |
| 7019 | BuilderFunctions::applyInheritOutlineColor(builderState); |
| 7020 | else |
| 7021 | BuilderFunctions::applyValueOutlineColor(builderState, value); |
| 7022 | break; |
| 7023 | case CSSPropertyOutlineOffset: |
| 7024 | if (isInitial) |
| 7025 | BuilderFunctions::applyInitialOutlineOffset(builderState); |
| 7026 | else if (isInherit) |
| 7027 | BuilderFunctions::applyInheritOutlineOffset(builderState); |
| 7028 | else |
| 7029 | BuilderFunctions::applyValueOutlineOffset(builderState, value); |
| 7030 | break; |
| 7031 | case CSSPropertyOutlineStyle: |
| 7032 | if (isInitial) |
| 7033 | BuilderCustom::applyInitialOutlineStyle(builderState); |
| 7034 | else if (isInherit) |
| 7035 | BuilderCustom::applyInheritOutlineStyle(builderState); |
| 7036 | else |
| 7037 | BuilderCustom::applyValueOutlineStyle(builderState, value); |
| 7038 | break; |
| 7039 | case CSSPropertyOutlineWidth: |
| 7040 | if (isInitial) |
| 7041 | BuilderFunctions::applyInitialOutlineWidth(builderState); |
| 7042 | else if (isInherit) |
| 7043 | BuilderFunctions::applyInheritOutlineWidth(builderState); |
| 7044 | else |
| 7045 | BuilderFunctions::applyValueOutlineWidth(builderState, value); |
| 7046 | break; |
| 7047 | case CSSPropertyOverflow: |
| 7048 | ASSERT(isShorthandCSSProperty(property)); |
| 7049 | ASSERT_NOT_REACHED(); |
| 7050 | break; |
| 7051 | case CSSPropertyOverflowWrap: |
| 7052 | if (isInitial) |
| 7053 | BuilderFunctions::applyInitialOverflowWrap(builderState); |
| 7054 | else if (isInherit) |
| 7055 | BuilderFunctions::applyInheritOverflowWrap(builderState); |
| 7056 | else |
| 7057 | BuilderFunctions::applyValueOverflowWrap(builderState, value); |
| 7058 | break; |
| 7059 | case CSSPropertyOverflowX: |
| 7060 | if (isInitial) |
| 7061 | BuilderFunctions::applyInitialOverflowX(builderState); |
| 7062 | else if (isInherit) |
| 7063 | BuilderFunctions::applyInheritOverflowX(builderState); |
| 7064 | else |
| 7065 | BuilderFunctions::applyValueOverflowX(builderState, value); |
| 7066 | break; |
| 7067 | case CSSPropertyOverflowY: |
| 7068 | if (isInitial) |
| 7069 | BuilderFunctions::applyInitialOverflowY(builderState); |
| 7070 | else if (isInherit) |
| 7071 | BuilderFunctions::applyInheritOverflowY(builderState); |
| 7072 | else |
| 7073 | BuilderFunctions::applyValueOverflowY(builderState, value); |
| 7074 | break; |
| 7075 | case CSSPropertyOverscrollBehavior: |
| 7076 | ASSERT(isShorthandCSSProperty(property)); |
| 7077 | ASSERT_NOT_REACHED(); |
| 7078 | break; |
| 7079 | case CSSPropertyOverscrollBehaviorX: |
| 7080 | if (isInitial) |
| 7081 | BuilderFunctions::applyInitialOverscrollBehaviorX(builderState); |
| 7082 | else if (isInherit) |
| 7083 | BuilderFunctions::applyInheritOverscrollBehaviorX(builderState); |
| 7084 | else |
| 7085 | BuilderFunctions::applyValueOverscrollBehaviorX(builderState, value); |
| 7086 | break; |
| 7087 | case CSSPropertyOverscrollBehaviorY: |
| 7088 | if (isInitial) |
| 7089 | BuilderFunctions::applyInitialOverscrollBehaviorY(builderState); |
| 7090 | else if (isInherit) |
| 7091 | BuilderFunctions::applyInheritOverscrollBehaviorY(builderState); |
| 7092 | else |
| 7093 | BuilderFunctions::applyValueOverscrollBehaviorY(builderState, value); |
| 7094 | break; |
| 7095 | case CSSPropertyPad: |
| 7096 | break; |
| 7097 | case CSSPropertyPadding: |
| 7098 | ASSERT(isShorthandCSSProperty(property)); |
| 7099 | ASSERT_NOT_REACHED(); |
| 7100 | break; |
| 7101 | case CSSPropertyPaddingBlock: |
| 7102 | ASSERT(isShorthandCSSProperty(property)); |
| 7103 | ASSERT_NOT_REACHED(); |
| 7104 | break; |
| 7105 | case CSSPropertyPaddingBlockEnd: |
| 7106 | break; |
| 7107 | case CSSPropertyPaddingBlockStart: |
| 7108 | break; |
| 7109 | case CSSPropertyPaddingBottom: |
| 7110 | if (isInitial) |
| 7111 | BuilderFunctions::applyInitialPaddingBottom(builderState); |
| 7112 | else if (isInherit) |
| 7113 | BuilderFunctions::applyInheritPaddingBottom(builderState); |
| 7114 | else |
| 7115 | BuilderFunctions::applyValuePaddingBottom(builderState, value); |
| 7116 | break; |
| 7117 | case CSSPropertyPaddingInline: |
| 7118 | ASSERT(isShorthandCSSProperty(property)); |
| 7119 | ASSERT_NOT_REACHED(); |
| 7120 | break; |
| 7121 | case CSSPropertyPaddingInlineEnd: |
| 7122 | break; |
| 7123 | case CSSPropertyPaddingInlineStart: |
| 7124 | break; |
| 7125 | case CSSPropertyPaddingLeft: |
| 7126 | if (isInitial) |
| 7127 | BuilderFunctions::applyInitialPaddingLeft(builderState); |
| 7128 | else if (isInherit) |
| 7129 | BuilderFunctions::applyInheritPaddingLeft(builderState); |
| 7130 | else |
| 7131 | BuilderFunctions::applyValuePaddingLeft(builderState, value); |
| 7132 | break; |
| 7133 | case CSSPropertyPaddingRight: |
| 7134 | if (isInitial) |
| 7135 | BuilderFunctions::applyInitialPaddingRight(builderState); |
| 7136 | else if (isInherit) |
| 7137 | BuilderFunctions::applyInheritPaddingRight(builderState); |
| 7138 | else |
| 7139 | BuilderFunctions::applyValuePaddingRight(builderState, value); |
| 7140 | break; |
| 7141 | case CSSPropertyPaddingTop: |
| 7142 | if (isInitial) |
| 7143 | BuilderFunctions::applyInitialPaddingTop(builderState); |
| 7144 | else if (isInherit) |
| 7145 | BuilderFunctions::applyInheritPaddingTop(builderState); |
| 7146 | else |
| 7147 | BuilderFunctions::applyValuePaddingTop(builderState, value); |
| 7148 | break; |
| 7149 | case CSSPropertyPage: |
| 7150 | break; |
| 7151 | case CSSPropertyPageBreakAfter: |
| 7152 | ASSERT(isShorthandCSSProperty(property)); |
| 7153 | ASSERT_NOT_REACHED(); |
| 7154 | break; |
| 7155 | case CSSPropertyPageBreakBefore: |
| 7156 | ASSERT(isShorthandCSSProperty(property)); |
| 7157 | ASSERT_NOT_REACHED(); |
| 7158 | break; |
| 7159 | case CSSPropertyPageBreakInside: |
| 7160 | ASSERT(isShorthandCSSProperty(property)); |
| 7161 | ASSERT_NOT_REACHED(); |
| 7162 | break; |
| 7163 | case CSSPropertyPaintOrder: |
| 7164 | if (isInitial) |
| 7165 | BuilderFunctions::applyInitialPaintOrder(builderState); |
| 7166 | else if (isInherit) |
| 7167 | BuilderFunctions::applyInheritPaintOrder(builderState); |
| 7168 | else |
| 7169 | BuilderFunctions::applyValuePaintOrder(builderState, value); |
| 7170 | break; |
| 7171 | case CSSPropertyPerspective: |
| 7172 | if (isInitial) |
| 7173 | BuilderFunctions::applyInitialPerspective(builderState); |
| 7174 | else if (isInherit) |
| 7175 | BuilderFunctions::applyInheritPerspective(builderState); |
| 7176 | else |
| 7177 | BuilderFunctions::applyValuePerspective(builderState, value); |
| 7178 | break; |
| 7179 | case CSSPropertyPerspectiveOrigin: |
| 7180 | ASSERT(isShorthandCSSProperty(property)); |
| 7181 | ASSERT_NOT_REACHED(); |
| 7182 | break; |
| 7183 | case CSSPropertyPerspectiveOriginX: |
| 7184 | if (isInitial) |
| 7185 | BuilderFunctions::applyInitialPerspectiveOriginX(builderState); |
| 7186 | else if (isInherit) |
| 7187 | BuilderFunctions::applyInheritPerspectiveOriginX(builderState); |
| 7188 | else |
| 7189 | BuilderFunctions::applyValuePerspectiveOriginX(builderState, value); |
| 7190 | break; |
| 7191 | case CSSPropertyPerspectiveOriginY: |
| 7192 | if (isInitial) |
| 7193 | BuilderFunctions::applyInitialPerspectiveOriginY(builderState); |
| 7194 | else if (isInherit) |
| 7195 | BuilderFunctions::applyInheritPerspectiveOriginY(builderState); |
| 7196 | else |
| 7197 | BuilderFunctions::applyValuePerspectiveOriginY(builderState, value); |
| 7198 | break; |
| 7199 | case CSSPropertyPlaceContent: |
| 7200 | ASSERT(isShorthandCSSProperty(property)); |
| 7201 | ASSERT_NOT_REACHED(); |
| 7202 | break; |
| 7203 | case CSSPropertyPlaceItems: |
| 7204 | ASSERT(isShorthandCSSProperty(property)); |
| 7205 | ASSERT_NOT_REACHED(); |
| 7206 | break; |
| 7207 | case CSSPropertyPlaceSelf: |
| 7208 | ASSERT(isShorthandCSSProperty(property)); |
| 7209 | ASSERT_NOT_REACHED(); |
| 7210 | break; |
| 7211 | case CSSPropertyPointerEvents: |
| 7212 | if (isInitial) |
| 7213 | BuilderFunctions::applyInitialPointerEvents(builderState); |
| 7214 | else if (isInherit) |
| 7215 | BuilderFunctions::applyInheritPointerEvents(builderState); |
| 7216 | else |
| 7217 | BuilderFunctions::applyValuePointerEvents(builderState, value); |
| 7218 | break; |
| 7219 | case CSSPropertyPosition: |
| 7220 | if (isInitial) |
| 7221 | BuilderFunctions::applyInitialPosition(builderState); |
| 7222 | else if (isInherit) |
| 7223 | BuilderFunctions::applyInheritPosition(builderState); |
| 7224 | else |
| 7225 | BuilderFunctions::applyValuePosition(builderState, value); |
| 7226 | break; |
| 7227 | case CSSPropertyPrefix: |
| 7228 | break; |
| 7229 | case CSSPropertyQuotes: |
| 7230 | if (isInitial) |
| 7231 | BuilderFunctions::applyInitialQuotes(builderState); |
| 7232 | else if (isInherit) |
| 7233 | BuilderFunctions::applyInheritQuotes(builderState); |
| 7234 | else |
| 7235 | BuilderFunctions::applyValueQuotes(builderState, value); |
| 7236 | break; |
| 7237 | case CSSPropertyR: |
| 7238 | if (isInitial) |
| 7239 | BuilderFunctions::applyInitialR(builderState); |
| 7240 | else if (isInherit) |
| 7241 | BuilderFunctions::applyInheritR(builderState); |
| 7242 | else |
| 7243 | BuilderFunctions::applyValueR(builderState, value); |
| 7244 | break; |
| 7245 | case CSSPropertyRange: |
| 7246 | break; |
| 7247 | case CSSPropertyResize: |
| 7248 | if (isInitial) |
| 7249 | BuilderFunctions::applyInitialResize(builderState); |
| 7250 | else if (isInherit) |
| 7251 | BuilderFunctions::applyInheritResize(builderState); |
| 7252 | else |
| 7253 | BuilderFunctions::applyValueResize(builderState, value); |
| 7254 | break; |
| 7255 | case CSSPropertyRight: |
| 7256 | if (isInitial) |
| 7257 | BuilderFunctions::applyInitialRight(builderState); |
| 7258 | else if (isInherit) |
| 7259 | BuilderFunctions::applyInheritRight(builderState); |
| 7260 | else |
| 7261 | BuilderFunctions::applyValueRight(builderState, value); |
| 7262 | break; |
| 7263 | case CSSPropertyRotate: |
| 7264 | if (isInitial) |
| 7265 | BuilderFunctions::applyInitialRotate(builderState); |
| 7266 | else if (isInherit) |
| 7267 | BuilderFunctions::applyInheritRotate(builderState); |
| 7268 | else |
| 7269 | BuilderFunctions::applyValueRotate(builderState, value); |
| 7270 | break; |
| 7271 | case CSSPropertyRowGap: |
| 7272 | if (isInitial) |
| 7273 | BuilderFunctions::applyInitialRowGap(builderState); |
| 7274 | else if (isInherit) |
| 7275 | BuilderFunctions::applyInheritRowGap(builderState); |
| 7276 | else |
| 7277 | BuilderFunctions::applyValueRowGap(builderState, value); |
| 7278 | break; |
| 7279 | case CSSPropertyRx: |
| 7280 | if (isInitial) |
| 7281 | BuilderFunctions::applyInitialRx(builderState); |
| 7282 | else if (isInherit) |
| 7283 | BuilderFunctions::applyInheritRx(builderState); |
| 7284 | else |
| 7285 | BuilderFunctions::applyValueRx(builderState, value); |
| 7286 | break; |
| 7287 | case CSSPropertyRy: |
| 7288 | if (isInitial) |
| 7289 | BuilderFunctions::applyInitialRy(builderState); |
| 7290 | else if (isInherit) |
| 7291 | BuilderFunctions::applyInheritRy(builderState); |
| 7292 | else |
| 7293 | BuilderFunctions::applyValueRy(builderState, value); |
| 7294 | break; |
| 7295 | case CSSPropertyScale: |
| 7296 | if (isInitial) |
| 7297 | BuilderFunctions::applyInitialScale(builderState); |
| 7298 | else if (isInherit) |
| 7299 | BuilderFunctions::applyInheritScale(builderState); |
| 7300 | else |
| 7301 | BuilderFunctions::applyValueScale(builderState, value); |
| 7302 | break; |
| 7303 | case CSSPropertyScrollBehavior: |
| 7304 | if (isInitial) |
| 7305 | BuilderFunctions::applyInitialScrollBehavior(builderState); |
| 7306 | else if (isInherit) |
| 7307 | BuilderFunctions::applyInheritScrollBehavior(builderState); |
| 7308 | else |
| 7309 | BuilderFunctions::applyValueScrollBehavior(builderState, value); |
| 7310 | break; |
| 7311 | case CSSPropertyScrollMargin: |
| 7312 | ASSERT(isShorthandCSSProperty(property)); |
| 7313 | ASSERT_NOT_REACHED(); |
| 7314 | break; |
| 7315 | case CSSPropertyScrollMarginBlock: |
| 7316 | ASSERT(isShorthandCSSProperty(property)); |
| 7317 | ASSERT_NOT_REACHED(); |
| 7318 | break; |
| 7319 | case CSSPropertyScrollMarginBlockEnd: |
| 7320 | break; |
| 7321 | case CSSPropertyScrollMarginBlockStart: |
| 7322 | break; |
| 7323 | case CSSPropertyScrollMarginBottom: |
| 7324 | if (isInitial) |
| 7325 | BuilderFunctions::applyInitialScrollMarginBottom(builderState); |
| 7326 | else if (isInherit) |
| 7327 | BuilderFunctions::applyInheritScrollMarginBottom(builderState); |
| 7328 | else |
| 7329 | BuilderFunctions::applyValueScrollMarginBottom(builderState, value); |
| 7330 | break; |
| 7331 | case CSSPropertyScrollMarginInline: |
| 7332 | ASSERT(isShorthandCSSProperty(property)); |
| 7333 | ASSERT_NOT_REACHED(); |
| 7334 | break; |
| 7335 | case CSSPropertyScrollMarginInlineEnd: |
| 7336 | break; |
| 7337 | case CSSPropertyScrollMarginInlineStart: |
| 7338 | break; |
| 7339 | case CSSPropertyScrollMarginLeft: |
| 7340 | if (isInitial) |
| 7341 | BuilderFunctions::applyInitialScrollMarginLeft(builderState); |
| 7342 | else if (isInherit) |
| 7343 | BuilderFunctions::applyInheritScrollMarginLeft(builderState); |
| 7344 | else |
| 7345 | BuilderFunctions::applyValueScrollMarginLeft(builderState, value); |
| 7346 | break; |
| 7347 | case CSSPropertyScrollMarginRight: |
| 7348 | if (isInitial) |
| 7349 | BuilderFunctions::applyInitialScrollMarginRight(builderState); |
| 7350 | else if (isInherit) |
| 7351 | BuilderFunctions::applyInheritScrollMarginRight(builderState); |
| 7352 | else |
| 7353 | BuilderFunctions::applyValueScrollMarginRight(builderState, value); |
| 7354 | break; |
| 7355 | case CSSPropertyScrollMarginTop: |
| 7356 | if (isInitial) |
| 7357 | BuilderFunctions::applyInitialScrollMarginTop(builderState); |
| 7358 | else if (isInherit) |
| 7359 | BuilderFunctions::applyInheritScrollMarginTop(builderState); |
| 7360 | else |
| 7361 | BuilderFunctions::applyValueScrollMarginTop(builderState, value); |
| 7362 | break; |
| 7363 | case CSSPropertyScrollPadding: |
| 7364 | ASSERT(isShorthandCSSProperty(property)); |
| 7365 | ASSERT_NOT_REACHED(); |
| 7366 | break; |
| 7367 | case CSSPropertyScrollPaddingBlock: |
| 7368 | ASSERT(isShorthandCSSProperty(property)); |
| 7369 | ASSERT_NOT_REACHED(); |
| 7370 | break; |
| 7371 | case CSSPropertyScrollPaddingBlockEnd: |
| 7372 | break; |
| 7373 | case CSSPropertyScrollPaddingBlockStart: |
| 7374 | break; |
| 7375 | case CSSPropertyScrollPaddingBottom: |
| 7376 | if (isInitial) |
| 7377 | BuilderFunctions::applyInitialScrollPaddingBottom(builderState); |
| 7378 | else if (isInherit) |
| 7379 | BuilderFunctions::applyInheritScrollPaddingBottom(builderState); |
| 7380 | else |
| 7381 | BuilderFunctions::applyValueScrollPaddingBottom(builderState, value); |
| 7382 | break; |
| 7383 | case CSSPropertyScrollPaddingInline: |
| 7384 | ASSERT(isShorthandCSSProperty(property)); |
| 7385 | ASSERT_NOT_REACHED(); |
| 7386 | break; |
| 7387 | case CSSPropertyScrollPaddingInlineEnd: |
| 7388 | break; |
| 7389 | case CSSPropertyScrollPaddingInlineStart: |
| 7390 | break; |
| 7391 | case CSSPropertyScrollPaddingLeft: |
| 7392 | if (isInitial) |
| 7393 | BuilderFunctions::applyInitialScrollPaddingLeft(builderState); |
| 7394 | else if (isInherit) |
| 7395 | BuilderFunctions::applyInheritScrollPaddingLeft(builderState); |
| 7396 | else |
| 7397 | BuilderFunctions::applyValueScrollPaddingLeft(builderState, value); |
| 7398 | break; |
| 7399 | case CSSPropertyScrollPaddingRight: |
| 7400 | if (isInitial) |
| 7401 | BuilderFunctions::applyInitialScrollPaddingRight(builderState); |
| 7402 | else if (isInherit) |
| 7403 | BuilderFunctions::applyInheritScrollPaddingRight(builderState); |
| 7404 | else |
| 7405 | BuilderFunctions::applyValueScrollPaddingRight(builderState, value); |
| 7406 | break; |
| 7407 | case CSSPropertyScrollPaddingTop: |
| 7408 | if (isInitial) |
| 7409 | BuilderFunctions::applyInitialScrollPaddingTop(builderState); |
| 7410 | else if (isInherit) |
| 7411 | BuilderFunctions::applyInheritScrollPaddingTop(builderState); |
| 7412 | else |
| 7413 | BuilderFunctions::applyValueScrollPaddingTop(builderState, value); |
| 7414 | break; |
| 7415 | case CSSPropertyScrollSnapAlign: |
| 7416 | if (isInitial) |
| 7417 | BuilderFunctions::applyInitialScrollSnapAlign(builderState); |
| 7418 | else if (isInherit) |
| 7419 | BuilderFunctions::applyInheritScrollSnapAlign(builderState); |
| 7420 | else |
| 7421 | BuilderFunctions::applyValueScrollSnapAlign(builderState, value); |
| 7422 | break; |
| 7423 | case CSSPropertyScrollSnapStop: |
| 7424 | if (isInitial) |
| 7425 | BuilderFunctions::applyInitialScrollSnapStop(builderState); |
| 7426 | else if (isInherit) |
| 7427 | BuilderFunctions::applyInheritScrollSnapStop(builderState); |
| 7428 | else |
| 7429 | BuilderFunctions::applyValueScrollSnapStop(builderState, value); |
| 7430 | break; |
| 7431 | case CSSPropertyScrollSnapType: |
| 7432 | if (isInitial) |
| 7433 | BuilderFunctions::applyInitialScrollSnapType(builderState); |
| 7434 | else if (isInherit) |
| 7435 | BuilderFunctions::applyInheritScrollSnapType(builderState); |
| 7436 | else |
| 7437 | BuilderFunctions::applyValueScrollSnapType(builderState, value); |
| 7438 | break; |
| 7439 | case CSSPropertyShapeImageThreshold: |
| 7440 | if (isInitial) |
| 7441 | BuilderFunctions::applyInitialShapeImageThreshold(builderState); |
| 7442 | else if (isInherit) |
| 7443 | BuilderFunctions::applyInheritShapeImageThreshold(builderState); |
| 7444 | else |
| 7445 | BuilderFunctions::applyValueShapeImageThreshold(builderState, value); |
| 7446 | break; |
| 7447 | case CSSPropertyShapeMargin: |
| 7448 | if (isInitial) |
| 7449 | BuilderFunctions::applyInitialShapeMargin(builderState); |
| 7450 | else if (isInherit) |
| 7451 | BuilderFunctions::applyInheritShapeMargin(builderState); |
| 7452 | else |
| 7453 | BuilderFunctions::applyValueShapeMargin(builderState, value); |
| 7454 | break; |
| 7455 | case CSSPropertyShapeOutside: |
| 7456 | if (isInitial) |
| 7457 | BuilderFunctions::applyInitialShapeOutside(builderState); |
| 7458 | else if (isInherit) |
| 7459 | BuilderFunctions::applyInheritShapeOutside(builderState); |
| 7460 | else |
| 7461 | BuilderFunctions::applyValueShapeOutside(builderState, value); |
| 7462 | break; |
| 7463 | case CSSPropertyShapeRendering: |
| 7464 | if (isInitial) |
| 7465 | BuilderFunctions::applyInitialShapeRendering(builderState); |
| 7466 | else if (isInherit) |
| 7467 | BuilderFunctions::applyInheritShapeRendering(builderState); |
| 7468 | else |
| 7469 | BuilderFunctions::applyValueShapeRendering(builderState, value); |
| 7470 | break; |
| 7471 | case CSSPropertySize: |
| 7472 | if (isInitial) |
| 7473 | BuilderCustom::applyInitialSize(builderState); |
| 7474 | else if (isInherit) |
| 7475 | BuilderCustom::applyInheritSize(builderState); |
| 7476 | else |
| 7477 | BuilderCustom::applyValueSize(builderState, value); |
| 7478 | break; |
| 7479 | case CSSPropertySpeakAs: |
| 7480 | if (isInitial) |
| 7481 | BuilderFunctions::applyInitialSpeakAs(builderState); |
| 7482 | else if (isInherit) |
| 7483 | BuilderFunctions::applyInheritSpeakAs(builderState); |
| 7484 | else |
| 7485 | BuilderFunctions::applyValueSpeakAs(builderState, value); |
| 7486 | break; |
| 7487 | case CSSPropertySrc: |
| 7488 | break; |
| 7489 | case CSSPropertyStopColor: |
| 7490 | if (isInitial) |
| 7491 | BuilderFunctions::applyInitialStopColor(builderState); |
| 7492 | else if (isInherit) |
| 7493 | BuilderFunctions::applyInheritStopColor(builderState); |
| 7494 | else |
| 7495 | BuilderFunctions::applyValueStopColor(builderState, value); |
| 7496 | break; |
| 7497 | case CSSPropertyStopOpacity: |
| 7498 | if (isInitial) |
| 7499 | BuilderFunctions::applyInitialStopOpacity(builderState); |
| 7500 | else if (isInherit) |
| 7501 | BuilderFunctions::applyInheritStopOpacity(builderState); |
| 7502 | else |
| 7503 | BuilderFunctions::applyValueStopOpacity(builderState, value); |
| 7504 | break; |
| 7505 | case CSSPropertyStroke: |
| 7506 | if (isInitial) |
| 7507 | BuilderCustom::applyInitialStroke(builderState); |
| 7508 | else if (isInherit) |
| 7509 | BuilderCustom::applyInheritStroke(builderState); |
| 7510 | else |
| 7511 | BuilderCustom::applyValueStroke(builderState, value); |
| 7512 | break; |
| 7513 | case CSSPropertyStrokeColor: |
| 7514 | if (isInitial) |
| 7515 | BuilderFunctions::applyInitialStrokeColor(builderState); |
| 7516 | else if (isInherit) |
| 7517 | BuilderFunctions::applyInheritStrokeColor(builderState); |
| 7518 | else |
| 7519 | BuilderCustom::applyValueStrokeColor(builderState, value); |
| 7520 | break; |
| 7521 | case CSSPropertyStrokeDasharray: |
| 7522 | if (isInitial) |
| 7523 | BuilderFunctions::applyInitialStrokeDasharray(builderState); |
| 7524 | else if (isInherit) |
| 7525 | BuilderFunctions::applyInheritStrokeDasharray(builderState); |
| 7526 | else |
| 7527 | BuilderFunctions::applyValueStrokeDasharray(builderState, value); |
| 7528 | break; |
| 7529 | case CSSPropertyStrokeDashoffset: |
| 7530 | if (isInitial) |
| 7531 | BuilderFunctions::applyInitialStrokeDashoffset(builderState); |
| 7532 | else if (isInherit) |
| 7533 | BuilderFunctions::applyInheritStrokeDashoffset(builderState); |
| 7534 | else |
| 7535 | BuilderFunctions::applyValueStrokeDashoffset(builderState, value); |
| 7536 | break; |
| 7537 | case CSSPropertyStrokeLinecap: |
| 7538 | if (isInitial) |
| 7539 | BuilderFunctions::applyInitialStrokeLinecap(builderState); |
| 7540 | else if (isInherit) |
| 7541 | BuilderFunctions::applyInheritStrokeLinecap(builderState); |
| 7542 | else |
| 7543 | BuilderFunctions::applyValueStrokeLinecap(builderState, value); |
| 7544 | break; |
| 7545 | case CSSPropertyStrokeLinejoin: |
| 7546 | if (isInitial) |
| 7547 | BuilderFunctions::applyInitialStrokeLinejoin(builderState); |
| 7548 | else if (isInherit) |
| 7549 | BuilderFunctions::applyInheritStrokeLinejoin(builderState); |
| 7550 | else |
| 7551 | BuilderFunctions::applyValueStrokeLinejoin(builderState, value); |
| 7552 | break; |
| 7553 | case CSSPropertyStrokeMiterlimit: |
| 7554 | if (isInitial) |
| 7555 | BuilderFunctions::applyInitialStrokeMiterlimit(builderState); |
| 7556 | else if (isInherit) |
| 7557 | BuilderFunctions::applyInheritStrokeMiterlimit(builderState); |
| 7558 | else |
| 7559 | BuilderFunctions::applyValueStrokeMiterlimit(builderState, value); |
| 7560 | break; |
| 7561 | case CSSPropertyStrokeOpacity: |
| 7562 | if (isInitial) |
| 7563 | BuilderFunctions::applyInitialStrokeOpacity(builderState); |
| 7564 | else if (isInherit) |
| 7565 | BuilderFunctions::applyInheritStrokeOpacity(builderState); |
| 7566 | else |
| 7567 | BuilderFunctions::applyValueStrokeOpacity(builderState, value); |
| 7568 | break; |
| 7569 | case CSSPropertyStrokeWidth: |
| 7570 | if (isInitial) |
| 7571 | BuilderFunctions::applyInitialStrokeWidth(builderState); |
| 7572 | else if (isInherit) |
| 7573 | BuilderFunctions::applyInheritStrokeWidth(builderState); |
| 7574 | else |
| 7575 | BuilderCustom::applyValueStrokeWidth(builderState, value); |
| 7576 | break; |
| 7577 | case CSSPropertySuffix: |
| 7578 | break; |
| 7579 | case CSSPropertySymbols: |
| 7580 | break; |
| 7581 | case CSSPropertySystem: |
| 7582 | break; |
| 7583 | case CSSPropertyTabSize: |
| 7584 | if (isInitial) |
| 7585 | BuilderFunctions::applyInitialTabSize(builderState); |
| 7586 | else if (isInherit) |
| 7587 | BuilderFunctions::applyInheritTabSize(builderState); |
| 7588 | else |
| 7589 | BuilderFunctions::applyValueTabSize(builderState, value); |
| 7590 | break; |
| 7591 | case CSSPropertyTableLayout: |
| 7592 | if (isInitial) |
| 7593 | BuilderFunctions::applyInitialTableLayout(builderState); |
| 7594 | else if (isInherit) |
| 7595 | BuilderFunctions::applyInheritTableLayout(builderState); |
| 7596 | else |
| 7597 | BuilderFunctions::applyValueTableLayout(builderState, value); |
| 7598 | break; |
| 7599 | case CSSPropertyTextAlign: |
| 7600 | if (isInitial) |
| 7601 | BuilderCustom::applyInitialTextAlign(builderState); |
| 7602 | else if (isInherit) |
| 7603 | BuilderFunctions::applyInheritTextAlign(builderState); |
| 7604 | else |
| 7605 | BuilderCustom::applyValueTextAlign(builderState, value); |
| 7606 | break; |
| 7607 | case CSSPropertyTextAnchor: |
| 7608 | if (isInitial) |
| 7609 | BuilderFunctions::applyInitialTextAnchor(builderState); |
| 7610 | else if (isInherit) |
| 7611 | BuilderFunctions::applyInheritTextAnchor(builderState); |
| 7612 | else |
| 7613 | BuilderFunctions::applyValueTextAnchor(builderState, value); |
| 7614 | break; |
| 7615 | case CSSPropertyTextDecoration: |
| 7616 | if (isInitial) |
| 7617 | BuilderFunctions::applyInitialTextDecoration(builderState); |
| 7618 | else if (isInherit) |
| 7619 | BuilderFunctions::applyInheritTextDecoration(builderState); |
| 7620 | else |
| 7621 | BuilderFunctions::applyValueTextDecoration(builderState, value); |
| 7622 | break; |
| 7623 | case CSSPropertyTextDecorationColor: |
| 7624 | if (isInitial) |
| 7625 | BuilderFunctions::applyInitialTextDecorationColor(builderState); |
| 7626 | else if (isInherit) |
| 7627 | BuilderFunctions::applyInheritTextDecorationColor(builderState); |
| 7628 | else |
| 7629 | BuilderFunctions::applyValueTextDecorationColor(builderState, value); |
| 7630 | break; |
| 7631 | case CSSPropertyTextDecorationLine: |
| 7632 | if (isInitial) |
| 7633 | BuilderFunctions::applyInitialTextDecorationLine(builderState); |
| 7634 | else if (isInherit) |
| 7635 | BuilderFunctions::applyInheritTextDecorationLine(builderState); |
| 7636 | else |
| 7637 | BuilderFunctions::applyValueTextDecorationLine(builderState, value); |
| 7638 | break; |
| 7639 | case CSSPropertyTextDecorationSkip: |
| 7640 | if (isInitial) |
| 7641 | BuilderFunctions::applyInitialTextDecorationSkip(builderState); |
| 7642 | else if (isInherit) |
| 7643 | BuilderFunctions::applyInheritTextDecorationSkip(builderState); |
| 7644 | else |
| 7645 | BuilderFunctions::applyValueTextDecorationSkip(builderState, value); |
| 7646 | break; |
| 7647 | case CSSPropertyTextDecorationStyle: |
| 7648 | if (isInitial) |
| 7649 | BuilderFunctions::applyInitialTextDecorationStyle(builderState); |
| 7650 | else if (isInherit) |
| 7651 | BuilderFunctions::applyInheritTextDecorationStyle(builderState); |
| 7652 | else |
| 7653 | BuilderFunctions::applyValueTextDecorationStyle(builderState, value); |
| 7654 | break; |
| 7655 | case CSSPropertyTextDecorationThickness: |
| 7656 | if (isInitial) |
| 7657 | BuilderFunctions::applyInitialTextDecorationThickness(builderState); |
| 7658 | else if (isInherit) |
| 7659 | BuilderFunctions::applyInheritTextDecorationThickness(builderState); |
| 7660 | else |
| 7661 | BuilderFunctions::applyValueTextDecorationThickness(builderState, value); |
| 7662 | break; |
| 7663 | case CSSPropertyTextIndent: |
| 7664 | if (isInitial) |
| 7665 | BuilderCustom::applyInitialTextIndent(builderState); |
| 7666 | else if (isInherit) |
| 7667 | BuilderCustom::applyInheritTextIndent(builderState); |
| 7668 | else |
| 7669 | BuilderCustom::applyValueTextIndent(builderState, value); |
| 7670 | break; |
| 7671 | case CSSPropertyTextOverflow: |
| 7672 | if (isInitial) |
| 7673 | BuilderFunctions::applyInitialTextOverflow(builderState); |
| 7674 | else if (isInherit) |
| 7675 | BuilderFunctions::applyInheritTextOverflow(builderState); |
| 7676 | else |
| 7677 | BuilderFunctions::applyValueTextOverflow(builderState, value); |
| 7678 | break; |
| 7679 | case CSSPropertyTextShadow: |
| 7680 | if (isInitial) |
| 7681 | BuilderCustom::applyInitialTextShadow(builderState); |
| 7682 | else if (isInherit) |
| 7683 | BuilderCustom::applyInheritTextShadow(builderState); |
| 7684 | else |
| 7685 | BuilderCustom::applyValueTextShadow(builderState, value); |
| 7686 | break; |
| 7687 | case CSSPropertyTextTransform: |
| 7688 | if (isInitial) |
| 7689 | BuilderFunctions::applyInitialTextTransform(builderState); |
| 7690 | else if (isInherit) |
| 7691 | BuilderFunctions::applyInheritTextTransform(builderState); |
| 7692 | else |
| 7693 | BuilderFunctions::applyValueTextTransform(builderState, value); |
| 7694 | break; |
| 7695 | case CSSPropertyTextUnderlineOffset: |
| 7696 | if (isInitial) |
| 7697 | BuilderFunctions::applyInitialTextUnderlineOffset(builderState); |
| 7698 | else if (isInherit) |
| 7699 | BuilderFunctions::applyInheritTextUnderlineOffset(builderState); |
| 7700 | else |
| 7701 | BuilderFunctions::applyValueTextUnderlineOffset(builderState, value); |
| 7702 | break; |
| 7703 | case CSSPropertyTextUnderlinePosition: |
| 7704 | if (isInitial) |
| 7705 | BuilderFunctions::applyInitialTextUnderlinePosition(builderState); |
| 7706 | else if (isInherit) |
| 7707 | BuilderFunctions::applyInheritTextUnderlinePosition(builderState); |
| 7708 | else |
| 7709 | BuilderFunctions::applyValueTextUnderlinePosition(builderState, value); |
| 7710 | break; |
| 7711 | case CSSPropertyTop: |
| 7712 | if (isInitial) |
| 7713 | BuilderFunctions::applyInitialTop(builderState); |
| 7714 | else if (isInherit) |
| 7715 | BuilderFunctions::applyInheritTop(builderState); |
| 7716 | else |
| 7717 | BuilderFunctions::applyValueTop(builderState, value); |
| 7718 | break; |
| 7719 | case CSSPropertyTouchAction: |
| 7720 | if (isInitial) |
| 7721 | BuilderFunctions::applyInitialTouchAction(builderState); |
| 7722 | else if (isInherit) |
| 7723 | BuilderFunctions::applyInheritTouchAction(builderState); |
| 7724 | else |
| 7725 | BuilderFunctions::applyValueTouchAction(builderState, value); |
| 7726 | break; |
| 7727 | case CSSPropertyTransform: |
| 7728 | if (isInitial) |
| 7729 | BuilderFunctions::applyInitialTransform(builderState); |
| 7730 | else if (isInherit) |
| 7731 | BuilderFunctions::applyInheritTransform(builderState); |
| 7732 | else |
| 7733 | BuilderFunctions::applyValueTransform(builderState, value); |
| 7734 | break; |
| 7735 | case CSSPropertyTransformBox: |
| 7736 | if (isInitial) |
| 7737 | BuilderFunctions::applyInitialTransformBox(builderState); |
| 7738 | else if (isInherit) |
| 7739 | BuilderFunctions::applyInheritTransformBox(builderState); |
| 7740 | else |
| 7741 | BuilderFunctions::applyValueTransformBox(builderState, value); |
| 7742 | break; |
| 7743 | case CSSPropertyTransformOrigin: |
| 7744 | ASSERT(isShorthandCSSProperty(property)); |
| 7745 | ASSERT_NOT_REACHED(); |
| 7746 | break; |
| 7747 | case CSSPropertyTransformOriginX: |
| 7748 | if (isInitial) |
| 7749 | BuilderFunctions::applyInitialTransformOriginX(builderState); |
| 7750 | else if (isInherit) |
| 7751 | BuilderFunctions::applyInheritTransformOriginX(builderState); |
| 7752 | else |
| 7753 | BuilderFunctions::applyValueTransformOriginX(builderState, value); |
| 7754 | break; |
| 7755 | case CSSPropertyTransformOriginY: |
| 7756 | if (isInitial) |
| 7757 | BuilderFunctions::applyInitialTransformOriginY(builderState); |
| 7758 | else if (isInherit) |
| 7759 | BuilderFunctions::applyInheritTransformOriginY(builderState); |
| 7760 | else |
| 7761 | BuilderFunctions::applyValueTransformOriginY(builderState, value); |
| 7762 | break; |
| 7763 | case CSSPropertyTransformOriginZ: |
| 7764 | if (isInitial) |
| 7765 | BuilderFunctions::applyInitialTransformOriginZ(builderState); |
| 7766 | else if (isInherit) |
| 7767 | BuilderFunctions::applyInheritTransformOriginZ(builderState); |
| 7768 | else |
| 7769 | BuilderFunctions::applyValueTransformOriginZ(builderState, value); |
| 7770 | break; |
| 7771 | case CSSPropertyTransformStyle: |
| 7772 | if (isInitial) |
| 7773 | BuilderFunctions::applyInitialTransformStyle(builderState); |
| 7774 | else if (isInherit) |
| 7775 | BuilderFunctions::applyInheritTransformStyle(builderState); |
| 7776 | else |
| 7777 | BuilderFunctions::applyValueTransformStyle(builderState, value); |
| 7778 | break; |
| 7779 | case CSSPropertyTransition: |
| 7780 | ASSERT(isShorthandCSSProperty(property)); |
| 7781 | ASSERT_NOT_REACHED(); |
| 7782 | break; |
| 7783 | case CSSPropertyTransitionDelay: |
| 7784 | if (isInitial) |
| 7785 | BuilderFunctions::applyInitialTransitionDelay(builderState); |
| 7786 | else if (isInherit) |
| 7787 | BuilderFunctions::applyInheritTransitionDelay(builderState); |
| 7788 | else |
| 7789 | BuilderFunctions::applyValueTransitionDelay(builderState, value); |
| 7790 | break; |
| 7791 | case CSSPropertyTransitionDuration: |
| 7792 | if (isInitial) |
| 7793 | BuilderFunctions::applyInitialTransitionDuration(builderState); |
| 7794 | else if (isInherit) |
| 7795 | BuilderFunctions::applyInheritTransitionDuration(builderState); |
| 7796 | else |
| 7797 | BuilderFunctions::applyValueTransitionDuration(builderState, value); |
| 7798 | break; |
| 7799 | case CSSPropertyTransitionProperty: |
| 7800 | if (isInitial) |
| 7801 | BuilderFunctions::applyInitialTransitionProperty(builderState); |
| 7802 | else if (isInherit) |
| 7803 | BuilderFunctions::applyInheritTransitionProperty(builderState); |
| 7804 | else |
| 7805 | BuilderFunctions::applyValueTransitionProperty(builderState, value); |
| 7806 | break; |
| 7807 | case CSSPropertyTransitionTimingFunction: |
| 7808 | if (isInitial) |
| 7809 | BuilderFunctions::applyInitialTransitionTimingFunction(builderState); |
| 7810 | else if (isInherit) |
| 7811 | BuilderFunctions::applyInheritTransitionTimingFunction(builderState); |
| 7812 | else |
| 7813 | BuilderFunctions::applyValueTransitionTimingFunction(builderState, value); |
| 7814 | break; |
| 7815 | case CSSPropertyTranslate: |
| 7816 | if (isInitial) |
| 7817 | BuilderFunctions::applyInitialTranslate(builderState); |
| 7818 | else if (isInherit) |
| 7819 | BuilderFunctions::applyInheritTranslate(builderState); |
| 7820 | else |
| 7821 | BuilderFunctions::applyValueTranslate(builderState, value); |
| 7822 | break; |
| 7823 | case CSSPropertyUnicodeBidi: |
| 7824 | if (isInitial) |
| 7825 | BuilderFunctions::applyInitialUnicodeBidi(builderState); |
| 7826 | else if (isInherit) |
| 7827 | BuilderFunctions::applyInheritUnicodeBidi(builderState); |
| 7828 | else |
| 7829 | BuilderFunctions::applyValueUnicodeBidi(builderState, value); |
| 7830 | break; |
| 7831 | case CSSPropertyUnicodeRange: |
| 7832 | break; |
| 7833 | case CSSPropertyVectorEffect: |
| 7834 | if (isInitial) |
| 7835 | BuilderFunctions::applyInitialVectorEffect(builderState); |
| 7836 | else if (isInherit) |
| 7837 | BuilderFunctions::applyInheritVectorEffect(builderState); |
| 7838 | else |
| 7839 | BuilderFunctions::applyValueVectorEffect(builderState, value); |
| 7840 | break; |
| 7841 | case CSSPropertyVerticalAlign: |
| 7842 | if (isInitial) |
| 7843 | BuilderFunctions::applyInitialVerticalAlign(builderState); |
| 7844 | else if (isInherit) |
| 7845 | BuilderCustom::applyInheritVerticalAlign(builderState); |
| 7846 | else |
| 7847 | BuilderCustom::applyValueVerticalAlign(builderState, value); |
| 7848 | break; |
| 7849 | case CSSPropertyVisibility: |
| 7850 | if (isInitial) |
| 7851 | BuilderFunctions::applyInitialVisibility(builderState); |
| 7852 | else if (isInherit) |
| 7853 | BuilderFunctions::applyInheritVisibility(builderState); |
| 7854 | else |
| 7855 | BuilderFunctions::applyValueVisibility(builderState, value); |
| 7856 | break; |
| 7857 | case CSSPropertyWhiteSpace: |
| 7858 | if (isInitial) |
| 7859 | BuilderFunctions::applyInitialWhiteSpace(builderState); |
| 7860 | else if (isInherit) |
| 7861 | BuilderFunctions::applyInheritWhiteSpace(builderState); |
| 7862 | else |
| 7863 | BuilderFunctions::applyValueWhiteSpace(builderState, value); |
| 7864 | break; |
| 7865 | case CSSPropertyWidows: |
| 7866 | if (isInitial) |
| 7867 | BuilderFunctions::applyInitialWidows(builderState); |
| 7868 | else if (isInherit) |
| 7869 | BuilderFunctions::applyInheritWidows(builderState); |
| 7870 | else |
| 7871 | BuilderFunctions::applyValueWidows(builderState, value); |
| 7872 | break; |
| 7873 | case CSSPropertyWidth: |
| 7874 | if (isInitial) |
| 7875 | BuilderFunctions::applyInitialWidth(builderState); |
| 7876 | else if (isInherit) |
| 7877 | BuilderFunctions::applyInheritWidth(builderState); |
| 7878 | else |
| 7879 | BuilderFunctions::applyValueWidth(builderState, value); |
| 7880 | break; |
| 7881 | case CSSPropertyWillChange: |
| 7882 | if (isInitial) |
| 7883 | BuilderFunctions::applyInitialWillChange(builderState); |
| 7884 | else if (isInherit) |
| 7885 | BuilderFunctions::applyInheritWillChange(builderState); |
| 7886 | else |
| 7887 | BuilderCustom::applyValueWillChange(builderState, value); |
| 7888 | break; |
| 7889 | case CSSPropertyWordBreak: |
| 7890 | if (isInitial) |
| 7891 | BuilderFunctions::applyInitialWordBreak(builderState); |
| 7892 | else if (isInherit) |
| 7893 | BuilderFunctions::applyInheritWordBreak(builderState); |
| 7894 | else |
| 7895 | BuilderFunctions::applyValueWordBreak(builderState, value); |
| 7896 | break; |
| 7897 | case CSSPropertyWordSpacing: |
| 7898 | if (isInitial) |
| 7899 | BuilderFunctions::applyInitialWordSpacing(builderState); |
| 7900 | else if (isInherit) |
| 7901 | BuilderFunctions::applyInheritWordSpacing(builderState); |
| 7902 | else |
| 7903 | BuilderFunctions::applyValueWordSpacing(builderState, value); |
| 7904 | break; |
| 7905 | case CSSPropertyWordWrap: |
| 7906 | if (isInitial) |
| 7907 | BuilderFunctions::applyInitialWordWrap(builderState); |
| 7908 | else if (isInherit) |
| 7909 | BuilderFunctions::applyInheritWordWrap(builderState); |
| 7910 | else |
| 7911 | BuilderFunctions::applyValueWordWrap(builderState, value); |
| 7912 | break; |
| 7913 | case CSSPropertyX: |
| 7914 | if (isInitial) |
| 7915 | BuilderFunctions::applyInitialX(builderState); |
| 7916 | else if (isInherit) |
| 7917 | BuilderFunctions::applyInheritX(builderState); |
| 7918 | else |
| 7919 | BuilderFunctions::applyValueX(builderState, value); |
| 7920 | break; |
| 7921 | case CSSPropertyY: |
| 7922 | if (isInitial) |
| 7923 | BuilderFunctions::applyInitialY(builderState); |
| 7924 | else if (isInherit) |
| 7925 | BuilderFunctions::applyInheritY(builderState); |
| 7926 | else |
| 7927 | BuilderFunctions::applyValueY(builderState, value); |
| 7928 | break; |
| 7929 | case CSSPropertyZIndex: |
| 7930 | if (isInitial) |
| 7931 | BuilderFunctions::applyInitialZIndex(builderState); |
| 7932 | else if (isInherit) |
| 7933 | BuilderFunctions::applyInheritZIndex(builderState); |
| 7934 | else |
| 7935 | BuilderFunctions::applyValueZIndex(builderState, value); |
| 7936 | break; |
| 7937 | case CSSPropertyAppleColorFilter: |
| 7938 | if (isInitial) |
| 7939 | BuilderFunctions::applyInitialAppleColorFilter(builderState); |
| 7940 | else if (isInherit) |
| 7941 | BuilderFunctions::applyInheritAppleColorFilter(builderState); |
| 7942 | else |
| 7943 | BuilderFunctions::applyValueAppleColorFilter(builderState, value); |
| 7944 | break; |
| 7945 | case CSSPropertyApplePayButtonStyle: |
| 7946 | if (isInitial) |
| 7947 | BuilderFunctions::applyInitialApplePayButtonStyle(builderState); |
| 7948 | else if (isInherit) |
| 7949 | BuilderFunctions::applyInheritApplePayButtonStyle(builderState); |
| 7950 | else |
| 7951 | BuilderFunctions::applyValueApplePayButtonStyle(builderState, value); |
| 7952 | break; |
| 7953 | case CSSPropertyApplePayButtonType: |
| 7954 | if (isInitial) |
| 7955 | BuilderFunctions::applyInitialApplePayButtonType(builderState); |
| 7956 | else if (isInherit) |
| 7957 | BuilderFunctions::applyInheritApplePayButtonType(builderState); |
| 7958 | else |
| 7959 | BuilderFunctions::applyValueApplePayButtonType(builderState, value); |
| 7960 | break; |
| 7961 | case CSSPropertyAppleTrailingWord: |
| 7962 | if (isInitial) |
| 7963 | BuilderFunctions::applyInitialAppleTrailingWord(builderState); |
| 7964 | else if (isInherit) |
| 7965 | BuilderFunctions::applyInheritAppleTrailingWord(builderState); |
| 7966 | else |
| 7967 | BuilderFunctions::applyValueAppleTrailingWord(builderState, value); |
| 7968 | break; |
| 7969 | case CSSPropertyInternalTextAutosizingStatus: |
| 7970 | break; |
| 7971 | case CSSPropertyWebkitAppearance: |
| 7972 | if (isInitial) |
| 7973 | BuilderFunctions::applyInitialWebkitAppearance(builderState); |
| 7974 | else if (isInherit) |
| 7975 | BuilderFunctions::applyInheritWebkitAppearance(builderState); |
| 7976 | else |
| 7977 | BuilderFunctions::applyValueWebkitAppearance(builderState, value); |
| 7978 | break; |
| 7979 | case CSSPropertyWebkitBackdropFilter: |
| 7980 | if (isInitial) |
| 7981 | BuilderFunctions::applyInitialWebkitBackdropFilter(builderState); |
| 7982 | else if (isInherit) |
| 7983 | BuilderFunctions::applyInheritWebkitBackdropFilter(builderState); |
| 7984 | else |
| 7985 | BuilderFunctions::applyValueWebkitBackdropFilter(builderState, value); |
| 7986 | break; |
| 7987 | case CSSPropertyWebkitBackfaceVisibility: |
| 7988 | if (isInitial) |
| 7989 | BuilderFunctions::applyInitialWebkitBackfaceVisibility(builderState); |
| 7990 | else if (isInherit) |
| 7991 | BuilderFunctions::applyInheritWebkitBackfaceVisibility(builderState); |
| 7992 | else |
| 7993 | BuilderFunctions::applyValueWebkitBackfaceVisibility(builderState, value); |
| 7994 | break; |
| 7995 | case CSSPropertyWebkitBackgroundClip: |
| 7996 | if (isInitial) |
| 7997 | BuilderFunctions::applyInitialWebkitBackgroundClip(builderState); |
| 7998 | else if (isInherit) |
| 7999 | BuilderFunctions::applyInheritWebkitBackgroundClip(builderState); |
| 8000 | else |
| 8001 | BuilderFunctions::applyValueWebkitBackgroundClip(builderState, value); |
| 8002 | break; |
| 8003 | case CSSPropertyWebkitBackgroundComposite: |
| 8004 | if (isInitial) |
| 8005 | BuilderFunctions::applyInitialWebkitBackgroundComposite(builderState); |
| 8006 | else if (isInherit) |
| 8007 | BuilderFunctions::applyInheritWebkitBackgroundComposite(builderState); |
| 8008 | else |
| 8009 | BuilderFunctions::applyValueWebkitBackgroundComposite(builderState, value); |
| 8010 | break; |
| 8011 | case CSSPropertyWebkitBackgroundOrigin: |
| 8012 | if (isInitial) |
| 8013 | BuilderFunctions::applyInitialWebkitBackgroundOrigin(builderState); |
| 8014 | else if (isInherit) |
| 8015 | BuilderFunctions::applyInheritWebkitBackgroundOrigin(builderState); |
| 8016 | else |
| 8017 | BuilderFunctions::applyValueWebkitBackgroundOrigin(builderState, value); |
| 8018 | break; |
| 8019 | case CSSPropertyWebkitBackgroundSize: |
| 8020 | if (isInitial) |
| 8021 | BuilderFunctions::applyInitialWebkitBackgroundSize(builderState); |
| 8022 | else if (isInherit) |
| 8023 | BuilderFunctions::applyInheritWebkitBackgroundSize(builderState); |
| 8024 | else |
| 8025 | BuilderFunctions::applyValueWebkitBackgroundSize(builderState, value); |
| 8026 | break; |
| 8027 | case CSSPropertyWebkitBorderFit: |
| 8028 | if (isInitial) |
| 8029 | BuilderFunctions::applyInitialWebkitBorderFit(builderState); |
| 8030 | else if (isInherit) |
| 8031 | BuilderFunctions::applyInheritWebkitBorderFit(builderState); |
| 8032 | else |
| 8033 | BuilderFunctions::applyValueWebkitBorderFit(builderState, value); |
| 8034 | break; |
| 8035 | case CSSPropertyWebkitBorderHorizontalSpacing: |
| 8036 | if (isInitial) |
| 8037 | BuilderFunctions::applyInitialWebkitBorderHorizontalSpacing(builderState); |
| 8038 | else if (isInherit) |
| 8039 | BuilderFunctions::applyInheritWebkitBorderHorizontalSpacing(builderState); |
| 8040 | else |
| 8041 | BuilderFunctions::applyValueWebkitBorderHorizontalSpacing(builderState, value); |
| 8042 | break; |
| 8043 | case CSSPropertyWebkitBorderImage: |
| 8044 | if (isInitial) |
| 8045 | BuilderFunctions::applyInitialWebkitBorderImage(builderState); |
| 8046 | else if (isInherit) |
| 8047 | BuilderFunctions::applyInheritWebkitBorderImage(builderState); |
| 8048 | else |
| 8049 | BuilderFunctions::applyValueWebkitBorderImage(builderState, value); |
| 8050 | break; |
| 8051 | case CSSPropertyWebkitBorderRadius: |
| 8052 | ASSERT(isShorthandCSSProperty(property)); |
| 8053 | ASSERT_NOT_REACHED(); |
| 8054 | break; |
| 8055 | case CSSPropertyWebkitBorderVerticalSpacing: |
| 8056 | if (isInitial) |
| 8057 | BuilderFunctions::applyInitialWebkitBorderVerticalSpacing(builderState); |
| 8058 | else if (isInherit) |
| 8059 | BuilderFunctions::applyInheritWebkitBorderVerticalSpacing(builderState); |
| 8060 | else |
| 8061 | BuilderFunctions::applyValueWebkitBorderVerticalSpacing(builderState, value); |
| 8062 | break; |
| 8063 | case CSSPropertyWebkitBoxAlign: |
| 8064 | if (isInitial) |
| 8065 | BuilderFunctions::applyInitialWebkitBoxAlign(builderState); |
| 8066 | else if (isInherit) |
| 8067 | BuilderFunctions::applyInheritWebkitBoxAlign(builderState); |
| 8068 | else |
| 8069 | BuilderFunctions::applyValueWebkitBoxAlign(builderState, value); |
| 8070 | break; |
| 8071 | case CSSPropertyWebkitBoxDecorationBreak: |
| 8072 | if (isInitial) |
| 8073 | BuilderFunctions::applyInitialWebkitBoxDecorationBreak(builderState); |
| 8074 | else if (isInherit) |
| 8075 | BuilderFunctions::applyInheritWebkitBoxDecorationBreak(builderState); |
| 8076 | else |
| 8077 | BuilderFunctions::applyValueWebkitBoxDecorationBreak(builderState, value); |
| 8078 | break; |
| 8079 | case CSSPropertyWebkitBoxDirection: |
| 8080 | if (isInitial) |
| 8081 | BuilderFunctions::applyInitialWebkitBoxDirection(builderState); |
| 8082 | else if (isInherit) |
| 8083 | BuilderFunctions::applyInheritWebkitBoxDirection(builderState); |
| 8084 | else |
| 8085 | BuilderFunctions::applyValueWebkitBoxDirection(builderState, value); |
| 8086 | break; |
| 8087 | case CSSPropertyWebkitBoxFlex: |
| 8088 | if (isInitial) |
| 8089 | BuilderFunctions::applyInitialWebkitBoxFlex(builderState); |
| 8090 | else if (isInherit) |
| 8091 | BuilderFunctions::applyInheritWebkitBoxFlex(builderState); |
| 8092 | else |
| 8093 | BuilderFunctions::applyValueWebkitBoxFlex(builderState, value); |
| 8094 | break; |
| 8095 | case CSSPropertyWebkitBoxFlexGroup: |
| 8096 | if (isInitial) |
| 8097 | BuilderFunctions::applyInitialWebkitBoxFlexGroup(builderState); |
| 8098 | else if (isInherit) |
| 8099 | BuilderFunctions::applyInheritWebkitBoxFlexGroup(builderState); |
| 8100 | else |
| 8101 | BuilderFunctions::applyValueWebkitBoxFlexGroup(builderState, value); |
| 8102 | break; |
| 8103 | case CSSPropertyWebkitBoxLines: |
| 8104 | if (isInitial) |
| 8105 | BuilderFunctions::applyInitialWebkitBoxLines(builderState); |
| 8106 | else if (isInherit) |
| 8107 | BuilderFunctions::applyInheritWebkitBoxLines(builderState); |
| 8108 | else |
| 8109 | BuilderFunctions::applyValueWebkitBoxLines(builderState, value); |
| 8110 | break; |
| 8111 | case CSSPropertyWebkitBoxOrdinalGroup: |
| 8112 | if (isInitial) |
| 8113 | BuilderFunctions::applyInitialWebkitBoxOrdinalGroup(builderState); |
| 8114 | else if (isInherit) |
| 8115 | BuilderFunctions::applyInheritWebkitBoxOrdinalGroup(builderState); |
| 8116 | else |
| 8117 | BuilderFunctions::applyValueWebkitBoxOrdinalGroup(builderState, value); |
| 8118 | break; |
| 8119 | case CSSPropertyWebkitBoxOrient: |
| 8120 | if (isInitial) |
| 8121 | BuilderFunctions::applyInitialWebkitBoxOrient(builderState); |
| 8122 | else if (isInherit) |
| 8123 | BuilderFunctions::applyInheritWebkitBoxOrient(builderState); |
| 8124 | else |
| 8125 | BuilderFunctions::applyValueWebkitBoxOrient(builderState, value); |
| 8126 | break; |
| 8127 | case CSSPropertyWebkitBoxPack: |
| 8128 | if (isInitial) |
| 8129 | BuilderFunctions::applyInitialWebkitBoxPack(builderState); |
| 8130 | else if (isInherit) |
| 8131 | BuilderFunctions::applyInheritWebkitBoxPack(builderState); |
| 8132 | else |
| 8133 | BuilderFunctions::applyValueWebkitBoxPack(builderState, value); |
| 8134 | break; |
| 8135 | case CSSPropertyWebkitBoxReflect: |
| 8136 | if (isInitial) |
| 8137 | BuilderFunctions::applyInitialWebkitBoxReflect(builderState); |
| 8138 | else if (isInherit) |
| 8139 | BuilderFunctions::applyInheritWebkitBoxReflect(builderState); |
| 8140 | else |
| 8141 | BuilderFunctions::applyValueWebkitBoxReflect(builderState, value); |
| 8142 | break; |
| 8143 | case CSSPropertyWebkitBoxShadow: |
| 8144 | if (isInitial) |
| 8145 | BuilderCustom::applyInitialWebkitBoxShadow(builderState); |
| 8146 | else if (isInherit) |
| 8147 | BuilderCustom::applyInheritWebkitBoxShadow(builderState); |
| 8148 | else |
| 8149 | BuilderCustom::applyValueWebkitBoxShadow(builderState, value); |
| 8150 | break; |
| 8151 | case CSSPropertyWebkitColumnAxis: |
| 8152 | if (isInitial) |
| 8153 | BuilderFunctions::applyInitialWebkitColumnAxis(builderState); |
| 8154 | else if (isInherit) |
| 8155 | BuilderFunctions::applyInheritWebkitColumnAxis(builderState); |
| 8156 | else |
| 8157 | BuilderFunctions::applyValueWebkitColumnAxis(builderState, value); |
| 8158 | break; |
| 8159 | case CSSPropertyWebkitColumnBreakAfter: |
| 8160 | ASSERT(isShorthandCSSProperty(property)); |
| 8161 | ASSERT_NOT_REACHED(); |
| 8162 | break; |
| 8163 | case CSSPropertyWebkitColumnBreakBefore: |
| 8164 | ASSERT(isShorthandCSSProperty(property)); |
| 8165 | ASSERT_NOT_REACHED(); |
| 8166 | break; |
| 8167 | case CSSPropertyWebkitColumnBreakInside: |
| 8168 | ASSERT(isShorthandCSSProperty(property)); |
| 8169 | ASSERT_NOT_REACHED(); |
| 8170 | break; |
| 8171 | case CSSPropertyWebkitColumnProgression: |
| 8172 | if (isInitial) |
| 8173 | BuilderFunctions::applyInitialWebkitColumnProgression(builderState); |
| 8174 | else if (isInherit) |
| 8175 | BuilderFunctions::applyInheritWebkitColumnProgression(builderState); |
| 8176 | else |
| 8177 | BuilderFunctions::applyValueWebkitColumnProgression(builderState, value); |
| 8178 | break; |
| 8179 | case CSSPropertyWebkitCursorVisibility: |
| 8180 | if (isInitial) |
| 8181 | BuilderFunctions::applyInitialWebkitCursorVisibility(builderState); |
| 8182 | else if (isInherit) |
| 8183 | BuilderFunctions::applyInheritWebkitCursorVisibility(builderState); |
| 8184 | else |
| 8185 | BuilderFunctions::applyValueWebkitCursorVisibility(builderState, value); |
| 8186 | break; |
| 8187 | case CSSPropertyWebkitFontSizeDelta: |
| 8188 | break; |
| 8189 | case CSSPropertyWebkitHyphenateCharacter: |
| 8190 | if (isInitial) |
| 8191 | BuilderFunctions::applyInitialWebkitHyphenateCharacter(builderState); |
| 8192 | else if (isInherit) |
| 8193 | BuilderFunctions::applyInheritWebkitHyphenateCharacter(builderState); |
| 8194 | else |
| 8195 | BuilderFunctions::applyValueWebkitHyphenateCharacter(builderState, value); |
| 8196 | break; |
| 8197 | case CSSPropertyWebkitHyphenateLimitAfter: |
| 8198 | if (isInitial) |
| 8199 | BuilderFunctions::applyInitialWebkitHyphenateLimitAfter(builderState); |
| 8200 | else if (isInherit) |
| 8201 | BuilderFunctions::applyInheritWebkitHyphenateLimitAfter(builderState); |
| 8202 | else |
| 8203 | BuilderFunctions::applyValueWebkitHyphenateLimitAfter(builderState, value); |
| 8204 | break; |
| 8205 | case CSSPropertyWebkitHyphenateLimitBefore: |
| 8206 | if (isInitial) |
| 8207 | BuilderFunctions::applyInitialWebkitHyphenateLimitBefore(builderState); |
| 8208 | else if (isInherit) |
| 8209 | BuilderFunctions::applyInheritWebkitHyphenateLimitBefore(builderState); |
| 8210 | else |
| 8211 | BuilderFunctions::applyValueWebkitHyphenateLimitBefore(builderState, value); |
| 8212 | break; |
| 8213 | case CSSPropertyWebkitHyphenateLimitLines: |
| 8214 | if (isInitial) |
| 8215 | BuilderFunctions::applyInitialWebkitHyphenateLimitLines(builderState); |
| 8216 | else if (isInherit) |
| 8217 | BuilderFunctions::applyInheritWebkitHyphenateLimitLines(builderState); |
| 8218 | else |
| 8219 | BuilderFunctions::applyValueWebkitHyphenateLimitLines(builderState, value); |
| 8220 | break; |
| 8221 | case CSSPropertyWebkitHyphens: |
| 8222 | if (isInitial) |
| 8223 | BuilderFunctions::applyInitialWebkitHyphens(builderState); |
| 8224 | else if (isInherit) |
| 8225 | BuilderFunctions::applyInheritWebkitHyphens(builderState); |
| 8226 | else |
| 8227 | BuilderFunctions::applyValueWebkitHyphens(builderState, value); |
| 8228 | break; |
| 8229 | case CSSPropertyWebkitInitialLetter: |
| 8230 | if (isInitial) |
| 8231 | BuilderFunctions::applyInitialWebkitInitialLetter(builderState); |
| 8232 | else if (isInherit) |
| 8233 | BuilderFunctions::applyInheritWebkitInitialLetter(builderState); |
| 8234 | else |
| 8235 | BuilderFunctions::applyValueWebkitInitialLetter(builderState, value); |
| 8236 | break; |
| 8237 | case CSSPropertyWebkitLineAlign: |
| 8238 | if (isInitial) |
| 8239 | BuilderFunctions::applyInitialWebkitLineAlign(builderState); |
| 8240 | else if (isInherit) |
| 8241 | BuilderFunctions::applyInheritWebkitLineAlign(builderState); |
| 8242 | else |
| 8243 | BuilderFunctions::applyValueWebkitLineAlign(builderState, value); |
| 8244 | break; |
| 8245 | case CSSPropertyWebkitLineBoxContain: |
| 8246 | if (isInitial) |
| 8247 | BuilderFunctions::applyInitialWebkitLineBoxContain(builderState); |
| 8248 | else if (isInherit) |
| 8249 | BuilderFunctions::applyInheritWebkitLineBoxContain(builderState); |
| 8250 | else |
| 8251 | BuilderFunctions::applyValueWebkitLineBoxContain(builderState, value); |
| 8252 | break; |
| 8253 | case CSSPropertyWebkitLineClamp: |
| 8254 | if (isInitial) |
| 8255 | BuilderFunctions::applyInitialWebkitLineClamp(builderState); |
| 8256 | else if (isInherit) |
| 8257 | BuilderFunctions::applyInheritWebkitLineClamp(builderState); |
| 8258 | else |
| 8259 | BuilderFunctions::applyValueWebkitLineClamp(builderState, value); |
| 8260 | break; |
| 8261 | case CSSPropertyWebkitLineGrid: |
| 8262 | if (isInitial) |
| 8263 | BuilderFunctions::applyInitialWebkitLineGrid(builderState); |
| 8264 | else if (isInherit) |
| 8265 | BuilderFunctions::applyInheritWebkitLineGrid(builderState); |
| 8266 | else |
| 8267 | BuilderFunctions::applyValueWebkitLineGrid(builderState, value); |
| 8268 | break; |
| 8269 | case CSSPropertyWebkitLineSnap: |
| 8270 | if (isInitial) |
| 8271 | BuilderFunctions::applyInitialWebkitLineSnap(builderState); |
| 8272 | else if (isInherit) |
| 8273 | BuilderFunctions::applyInheritWebkitLineSnap(builderState); |
| 8274 | else |
| 8275 | BuilderFunctions::applyValueWebkitLineSnap(builderState, value); |
| 8276 | break; |
| 8277 | case CSSPropertyWebkitMarginAfterCollapse: |
| 8278 | if (isInitial) |
| 8279 | BuilderFunctions::applyInitialWebkitMarginAfterCollapse(builderState); |
| 8280 | else if (isInherit) |
| 8281 | BuilderFunctions::applyInheritWebkitMarginAfterCollapse(builderState); |
| 8282 | else |
| 8283 | BuilderFunctions::applyValueWebkitMarginAfterCollapse(builderState, value); |
| 8284 | break; |
| 8285 | case CSSPropertyWebkitMarginBeforeCollapse: |
| 8286 | if (isInitial) |
| 8287 | BuilderFunctions::applyInitialWebkitMarginBeforeCollapse(builderState); |
| 8288 | else if (isInherit) |
| 8289 | BuilderFunctions::applyInheritWebkitMarginBeforeCollapse(builderState); |
| 8290 | else |
| 8291 | BuilderFunctions::applyValueWebkitMarginBeforeCollapse(builderState, value); |
| 8292 | break; |
| 8293 | case CSSPropertyWebkitMarginBottomCollapse: |
| 8294 | if (isInitial) |
| 8295 | BuilderFunctions::applyInitialWebkitMarginBottomCollapse(builderState); |
| 8296 | else if (isInherit) |
| 8297 | BuilderFunctions::applyInheritWebkitMarginBottomCollapse(builderState); |
| 8298 | else |
| 8299 | BuilderFunctions::applyValueWebkitMarginBottomCollapse(builderState, value); |
| 8300 | break; |
| 8301 | case CSSPropertyWebkitMarginCollapse: |
| 8302 | ASSERT(isShorthandCSSProperty(property)); |
| 8303 | ASSERT_NOT_REACHED(); |
| 8304 | break; |
| 8305 | case CSSPropertyWebkitMarginTopCollapse: |
| 8306 | if (isInitial) |
| 8307 | BuilderFunctions::applyInitialWebkitMarginTopCollapse(builderState); |
| 8308 | else if (isInherit) |
| 8309 | BuilderFunctions::applyInheritWebkitMarginTopCollapse(builderState); |
| 8310 | else |
| 8311 | BuilderFunctions::applyValueWebkitMarginTopCollapse(builderState, value); |
| 8312 | break; |
| 8313 | case CSSPropertyWebkitMarqueeDirection: |
| 8314 | if (isInitial) |
| 8315 | BuilderFunctions::applyInitialWebkitMarqueeDirection(builderState); |
| 8316 | else if (isInherit) |
| 8317 | BuilderFunctions::applyInheritWebkitMarqueeDirection(builderState); |
| 8318 | else |
| 8319 | BuilderFunctions::applyValueWebkitMarqueeDirection(builderState, value); |
| 8320 | break; |
| 8321 | case CSSPropertyWebkitMarqueeIncrement: |
| 8322 | if (isInitial) |
| 8323 | BuilderFunctions::applyInitialWebkitMarqueeIncrement(builderState); |
| 8324 | else if (isInherit) |
| 8325 | BuilderFunctions::applyInheritWebkitMarqueeIncrement(builderState); |
| 8326 | else |
| 8327 | BuilderFunctions::applyValueWebkitMarqueeIncrement(builderState, value); |
| 8328 | break; |
| 8329 | case CSSPropertyWebkitMarqueeRepetition: |
| 8330 | if (isInitial) |
| 8331 | BuilderFunctions::applyInitialWebkitMarqueeRepetition(builderState); |
| 8332 | else if (isInherit) |
| 8333 | BuilderFunctions::applyInheritWebkitMarqueeRepetition(builderState); |
| 8334 | else |
| 8335 | BuilderFunctions::applyValueWebkitMarqueeRepetition(builderState, value); |
| 8336 | break; |
| 8337 | case CSSPropertyWebkitMarqueeSpeed: |
| 8338 | if (isInitial) |
| 8339 | BuilderFunctions::applyInitialWebkitMarqueeSpeed(builderState); |
| 8340 | else if (isInherit) |
| 8341 | BuilderFunctions::applyInheritWebkitMarqueeSpeed(builderState); |
| 8342 | else |
| 8343 | BuilderFunctions::applyValueWebkitMarqueeSpeed(builderState, value); |
| 8344 | break; |
| 8345 | case CSSPropertyWebkitMarqueeStyle: |
| 8346 | if (isInitial) |
| 8347 | BuilderFunctions::applyInitialWebkitMarqueeStyle(builderState); |
| 8348 | else if (isInherit) |
| 8349 | BuilderFunctions::applyInheritWebkitMarqueeStyle(builderState); |
| 8350 | else |
| 8351 | BuilderFunctions::applyValueWebkitMarqueeStyle(builderState, value); |
| 8352 | break; |
| 8353 | case CSSPropertyWebkitMask: |
| 8354 | ASSERT(isShorthandCSSProperty(property)); |
| 8355 | ASSERT_NOT_REACHED(); |
| 8356 | break; |
| 8357 | case CSSPropertyWebkitMaskBoxImage: |
| 8358 | if (isInitial) |
| 8359 | BuilderFunctions::applyInitialWebkitMaskBoxImage(builderState); |
| 8360 | else if (isInherit) |
| 8361 | BuilderFunctions::applyInheritWebkitMaskBoxImage(builderState); |
| 8362 | else |
| 8363 | BuilderFunctions::applyValueWebkitMaskBoxImage(builderState, value); |
| 8364 | break; |
| 8365 | case CSSPropertyWebkitMaskBoxImageOutset: |
| 8366 | if (isInitial) |
| 8367 | BuilderCustom::applyInitialWebkitMaskBoxImageOutset(builderState); |
| 8368 | else if (isInherit) |
| 8369 | BuilderCustom::applyInheritWebkitMaskBoxImageOutset(builderState); |
| 8370 | else |
| 8371 | BuilderCustom::applyValueWebkitMaskBoxImageOutset(builderState, value); |
| 8372 | break; |
| 8373 | case CSSPropertyWebkitMaskBoxImageRepeat: |
| 8374 | if (isInitial) |
| 8375 | BuilderCustom::applyInitialWebkitMaskBoxImageRepeat(builderState); |
| 8376 | else if (isInherit) |
| 8377 | BuilderCustom::applyInheritWebkitMaskBoxImageRepeat(builderState); |
| 8378 | else |
| 8379 | BuilderCustom::applyValueWebkitMaskBoxImageRepeat(builderState, value); |
| 8380 | break; |
| 8381 | case CSSPropertyWebkitMaskBoxImageSlice: |
| 8382 | if (isInitial) |
| 8383 | BuilderCustom::applyInitialWebkitMaskBoxImageSlice(builderState); |
| 8384 | else if (isInherit) |
| 8385 | BuilderCustom::applyInheritWebkitMaskBoxImageSlice(builderState); |
| 8386 | else |
| 8387 | BuilderCustom::applyValueWebkitMaskBoxImageSlice(builderState, value); |
| 8388 | break; |
| 8389 | case CSSPropertyWebkitMaskBoxImageSource: |
| 8390 | if (isInitial) |
| 8391 | BuilderFunctions::applyInitialWebkitMaskBoxImageSource(builderState); |
| 8392 | else if (isInherit) |
| 8393 | BuilderFunctions::applyInheritWebkitMaskBoxImageSource(builderState); |
| 8394 | else |
| 8395 | BuilderFunctions::applyValueWebkitMaskBoxImageSource(builderState, value); |
| 8396 | break; |
| 8397 | case CSSPropertyWebkitMaskBoxImageWidth: |
| 8398 | if (isInitial) |
| 8399 | BuilderCustom::applyInitialWebkitMaskBoxImageWidth(builderState); |
| 8400 | else if (isInherit) |
| 8401 | BuilderCustom::applyInheritWebkitMaskBoxImageWidth(builderState); |
| 8402 | else |
| 8403 | BuilderCustom::applyValueWebkitMaskBoxImageWidth(builderState, value); |
| 8404 | break; |
| 8405 | case CSSPropertyWebkitMaskClip: |
| 8406 | if (isInitial) |
| 8407 | BuilderFunctions::applyInitialWebkitMaskClip(builderState); |
| 8408 | else if (isInherit) |
| 8409 | BuilderFunctions::applyInheritWebkitMaskClip(builderState); |
| 8410 | else |
| 8411 | BuilderFunctions::applyValueWebkitMaskClip(builderState, value); |
| 8412 | break; |
| 8413 | case CSSPropertyWebkitMaskComposite: |
| 8414 | if (isInitial) |
| 8415 | BuilderFunctions::applyInitialWebkitMaskComposite(builderState); |
| 8416 | else if (isInherit) |
| 8417 | BuilderFunctions::applyInheritWebkitMaskComposite(builderState); |
| 8418 | else |
| 8419 | BuilderFunctions::applyValueWebkitMaskComposite(builderState, value); |
| 8420 | break; |
| 8421 | case CSSPropertyWebkitMaskImage: |
| 8422 | if (isInitial) |
| 8423 | BuilderFunctions::applyInitialWebkitMaskImage(builderState); |
| 8424 | else if (isInherit) |
| 8425 | BuilderFunctions::applyInheritWebkitMaskImage(builderState); |
| 8426 | else |
| 8427 | BuilderFunctions::applyValueWebkitMaskImage(builderState, value); |
| 8428 | break; |
| 8429 | case CSSPropertyWebkitMaskOrigin: |
| 8430 | if (isInitial) |
| 8431 | BuilderFunctions::applyInitialWebkitMaskOrigin(builderState); |
| 8432 | else if (isInherit) |
| 8433 | BuilderFunctions::applyInheritWebkitMaskOrigin(builderState); |
| 8434 | else |
| 8435 | BuilderFunctions::applyValueWebkitMaskOrigin(builderState, value); |
| 8436 | break; |
| 8437 | case CSSPropertyWebkitMaskPosition: |
| 8438 | ASSERT(isShorthandCSSProperty(property)); |
| 8439 | ASSERT_NOT_REACHED(); |
| 8440 | break; |
| 8441 | case CSSPropertyWebkitMaskPositionX: |
| 8442 | if (isInitial) |
| 8443 | BuilderFunctions::applyInitialWebkitMaskPositionX(builderState); |
| 8444 | else if (isInherit) |
| 8445 | BuilderFunctions::applyInheritWebkitMaskPositionX(builderState); |
| 8446 | else |
| 8447 | BuilderFunctions::applyValueWebkitMaskPositionX(builderState, value); |
| 8448 | break; |
| 8449 | case CSSPropertyWebkitMaskPositionY: |
| 8450 | if (isInitial) |
| 8451 | BuilderFunctions::applyInitialWebkitMaskPositionY(builderState); |
| 8452 | else if (isInherit) |
| 8453 | BuilderFunctions::applyInheritWebkitMaskPositionY(builderState); |
| 8454 | else |
| 8455 | BuilderFunctions::applyValueWebkitMaskPositionY(builderState, value); |
| 8456 | break; |
| 8457 | case CSSPropertyWebkitMaskRepeat: |
| 8458 | ASSERT(isShorthandCSSProperty(property)); |
| 8459 | ASSERT_NOT_REACHED(); |
| 8460 | break; |
| 8461 | case CSSPropertyWebkitMaskRepeatX: |
| 8462 | if (isInitial) |
| 8463 | BuilderFunctions::applyInitialWebkitMaskRepeatX(builderState); |
| 8464 | else if (isInherit) |
| 8465 | BuilderFunctions::applyInheritWebkitMaskRepeatX(builderState); |
| 8466 | else |
| 8467 | BuilderFunctions::applyValueWebkitMaskRepeatX(builderState, value); |
| 8468 | break; |
| 8469 | case CSSPropertyWebkitMaskRepeatY: |
| 8470 | if (isInitial) |
| 8471 | BuilderFunctions::applyInitialWebkitMaskRepeatY(builderState); |
| 8472 | else if (isInherit) |
| 8473 | BuilderFunctions::applyInheritWebkitMaskRepeatY(builderState); |
| 8474 | else |
| 8475 | BuilderFunctions::applyValueWebkitMaskRepeatY(builderState, value); |
| 8476 | break; |
| 8477 | case CSSPropertyWebkitMaskSize: |
| 8478 | if (isInitial) |
| 8479 | BuilderFunctions::applyInitialWebkitMaskSize(builderState); |
| 8480 | else if (isInherit) |
| 8481 | BuilderFunctions::applyInheritWebkitMaskSize(builderState); |
| 8482 | else |
| 8483 | BuilderFunctions::applyValueWebkitMaskSize(builderState, value); |
| 8484 | break; |
| 8485 | case CSSPropertyWebkitMaskSourceType: |
| 8486 | if (isInitial) |
| 8487 | BuilderFunctions::applyInitialWebkitMaskSourceType(builderState); |
| 8488 | else if (isInherit) |
| 8489 | BuilderFunctions::applyInheritWebkitMaskSourceType(builderState); |
| 8490 | else |
| 8491 | BuilderFunctions::applyValueWebkitMaskSourceType(builderState, value); |
| 8492 | break; |
| 8493 | case CSSPropertyWebkitNbspMode: |
| 8494 | if (isInitial) |
| 8495 | BuilderFunctions::applyInitialWebkitNbspMode(builderState); |
| 8496 | else if (isInherit) |
| 8497 | BuilderFunctions::applyInheritWebkitNbspMode(builderState); |
| 8498 | else |
| 8499 | BuilderFunctions::applyValueWebkitNbspMode(builderState, value); |
| 8500 | break; |
| 8501 | case CSSPropertyWebkitPrintColorAdjust: |
| 8502 | if (isInitial) |
| 8503 | BuilderFunctions::applyInitialWebkitPrintColorAdjust(builderState); |
| 8504 | else if (isInherit) |
| 8505 | BuilderFunctions::applyInheritWebkitPrintColorAdjust(builderState); |
| 8506 | else |
| 8507 | BuilderFunctions::applyValueWebkitPrintColorAdjust(builderState, value); |
| 8508 | break; |
| 8509 | case CSSPropertyWebkitRtlOrdering: |
| 8510 | if (isInitial) |
| 8511 | BuilderFunctions::applyInitialWebkitRtlOrdering(builderState); |
| 8512 | else if (isInherit) |
| 8513 | BuilderFunctions::applyInheritWebkitRtlOrdering(builderState); |
| 8514 | else |
| 8515 | BuilderFunctions::applyValueWebkitRtlOrdering(builderState, value); |
| 8516 | break; |
| 8517 | case CSSPropertyWebkitRubyPosition: |
| 8518 | if (isInitial) |
| 8519 | BuilderFunctions::applyInitialWebkitRubyPosition(builderState); |
| 8520 | else if (isInherit) |
| 8521 | BuilderFunctions::applyInheritWebkitRubyPosition(builderState); |
| 8522 | else |
| 8523 | BuilderFunctions::applyValueWebkitRubyPosition(builderState, value); |
| 8524 | break; |
| 8525 | case CSSPropertyWebkitTextCombine: |
| 8526 | if (isInitial) |
| 8527 | BuilderFunctions::applyInitialWebkitTextCombine(builderState); |
| 8528 | else if (isInherit) |
| 8529 | BuilderFunctions::applyInheritWebkitTextCombine(builderState); |
| 8530 | else |
| 8531 | BuilderFunctions::applyValueWebkitTextCombine(builderState, value); |
| 8532 | break; |
| 8533 | case CSSPropertyWebkitTextDecoration: |
| 8534 | ASSERT(isShorthandCSSProperty(property)); |
| 8535 | ASSERT_NOT_REACHED(); |
| 8536 | break; |
| 8537 | case CSSPropertyWebkitTextDecorationsInEffect: |
| 8538 | break; |
| 8539 | case CSSPropertyWebkitTextEmphasis: |
| 8540 | ASSERT(isShorthandCSSProperty(property)); |
| 8541 | ASSERT_NOT_REACHED(); |
| 8542 | break; |
| 8543 | case CSSPropertyWebkitTextEmphasisColor: |
| 8544 | if (isInitial) |
| 8545 | BuilderFunctions::applyInitialWebkitTextEmphasisColor(builderState); |
| 8546 | else if (isInherit) |
| 8547 | BuilderFunctions::applyInheritWebkitTextEmphasisColor(builderState); |
| 8548 | else |
| 8549 | BuilderFunctions::applyValueWebkitTextEmphasisColor(builderState, value); |
| 8550 | break; |
| 8551 | case CSSPropertyWebkitTextEmphasisPosition: |
| 8552 | if (isInitial) |
| 8553 | BuilderFunctions::applyInitialWebkitTextEmphasisPosition(builderState); |
| 8554 | else if (isInherit) |
| 8555 | BuilderFunctions::applyInheritWebkitTextEmphasisPosition(builderState); |
| 8556 | else |
| 8557 | BuilderFunctions::applyValueWebkitTextEmphasisPosition(builderState, value); |
| 8558 | break; |
| 8559 | case CSSPropertyWebkitTextEmphasisStyle: |
| 8560 | if (isInitial) |
| 8561 | BuilderCustom::applyInitialWebkitTextEmphasisStyle(builderState); |
| 8562 | else if (isInherit) |
| 8563 | BuilderCustom::applyInheritWebkitTextEmphasisStyle(builderState); |
| 8564 | else |
| 8565 | BuilderCustom::applyValueWebkitTextEmphasisStyle(builderState, value); |
| 8566 | break; |
| 8567 | case CSSPropertyWebkitTextFillColor: |
| 8568 | if (isInitial) |
| 8569 | BuilderFunctions::applyInitialWebkitTextFillColor(builderState); |
| 8570 | else if (isInherit) |
| 8571 | BuilderFunctions::applyInheritWebkitTextFillColor(builderState); |
| 8572 | else |
| 8573 | BuilderFunctions::applyValueWebkitTextFillColor(builderState, value); |
| 8574 | break; |
| 8575 | case CSSPropertyWebkitTextSecurity: |
| 8576 | if (isInitial) |
| 8577 | BuilderFunctions::applyInitialWebkitTextSecurity(builderState); |
| 8578 | else if (isInherit) |
| 8579 | BuilderFunctions::applyInheritWebkitTextSecurity(builderState); |
| 8580 | else |
| 8581 | BuilderFunctions::applyValueWebkitTextSecurity(builderState, value); |
| 8582 | break; |
| 8583 | case CSSPropertyWebkitTextStroke: |
| 8584 | ASSERT(isShorthandCSSProperty(property)); |
| 8585 | ASSERT_NOT_REACHED(); |
| 8586 | break; |
| 8587 | case CSSPropertyWebkitTextStrokeColor: |
| 8588 | if (isInitial) |
| 8589 | BuilderFunctions::applyInitialWebkitTextStrokeColor(builderState); |
| 8590 | else if (isInherit) |
| 8591 | BuilderFunctions::applyInheritWebkitTextStrokeColor(builderState); |
| 8592 | else |
| 8593 | BuilderFunctions::applyValueWebkitTextStrokeColor(builderState, value); |
| 8594 | break; |
| 8595 | case CSSPropertyWebkitTextStrokeWidth: |
| 8596 | if (isInitial) |
| 8597 | BuilderFunctions::applyInitialWebkitTextStrokeWidth(builderState); |
| 8598 | else if (isInherit) |
| 8599 | BuilderFunctions::applyInheritWebkitTextStrokeWidth(builderState); |
| 8600 | else |
| 8601 | BuilderFunctions::applyValueWebkitTextStrokeWidth(builderState, value); |
| 8602 | break; |
| 8603 | case CSSPropertyWebkitTransformStyle: |
| 8604 | if (isInitial) |
| 8605 | BuilderFunctions::applyInitialWebkitTransformStyle(builderState); |
| 8606 | else if (isInherit) |
| 8607 | BuilderFunctions::applyInheritWebkitTransformStyle(builderState); |
| 8608 | else |
| 8609 | BuilderFunctions::applyValueWebkitTransformStyle(builderState, value); |
| 8610 | break; |
| 8611 | case CSSPropertyWebkitUserDrag: |
| 8612 | if (isInitial) |
| 8613 | BuilderFunctions::applyInitialWebkitUserDrag(builderState); |
| 8614 | else if (isInherit) |
| 8615 | BuilderFunctions::applyInheritWebkitUserDrag(builderState); |
| 8616 | else |
| 8617 | BuilderFunctions::applyValueWebkitUserDrag(builderState, value); |
| 8618 | break; |
| 8619 | case CSSPropertyWebkitUserModify: |
| 8620 | if (isInitial) |
| 8621 | BuilderFunctions::applyInitialWebkitUserModify(builderState); |
| 8622 | else if (isInherit) |
| 8623 | BuilderFunctions::applyInheritWebkitUserModify(builderState); |
| 8624 | else |
| 8625 | BuilderFunctions::applyValueWebkitUserModify(builderState, value); |
| 8626 | break; |
| 8627 | case CSSPropertyWebkitUserSelect: |
| 8628 | if (isInitial) |
| 8629 | BuilderFunctions::applyInitialWebkitUserSelect(builderState); |
| 8630 | else if (isInherit) |
| 8631 | BuilderFunctions::applyInheritWebkitUserSelect(builderState); |
| 8632 | else |
| 8633 | BuilderFunctions::applyValueWebkitUserSelect(builderState, value); |
| 8634 | break; |
| 8635 | }; |
| 8636 | } |
| 8637 | |
| 8638 | } // namespace Style |
| 8639 | } // namespace WebCore |
| 8640 | |